Improve memory effects of DebugBacktrace and DbgTraceCall
commitb06c22480ea52819719f7d08c56da16d50c6a8b2
authorJan Oravec <jan@fb.com>
Fri, 13 May 2022 05:28:46 +0000 (12 22:28 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 13 May 2022 05:28:46 +0000 (12 22:28 -0700)
tree1f582edc847c895ff8abc43095dca75403c79d87
parentecadea8a8365e93be7717ea812539d19f195f2ab
Improve memory effects of DebugBacktrace and DbgTraceCall

Summary:
Remove AStackAny from DebugBacktrace's loads, as it does not inspect any stack
elements.

Use exact stack range for loads of DbgTraceCall that contains only stack cells
that actually exist.

Allows store elim to optimize away writes to stack cells that are no longer
valid at these instructions. Without this change store elim would sometimes
defer these writes, possibly beyond decref and release.

If a phi was created in the process, builds with HHIRGenerateAsserts enabled
would then emit assertions that the refcount is still valid.

Reviewed By: ricklavoie

Differential Revision: D36361209

fbshipit-source-id: 1bb07dd85b4108bc32f4837325a462e08d27a754
hphp/runtime/vm/jit/memory-effects.cpp
hphp/test/slow/exceptions/timeout_init.php.opts [new file with mode: 0644]