Fix inlining decider bugs with FCallAwait
commit833ffeb5394f7c71c8e566fabfa985e4fd8799a1
authorPaul Bissonnette <paulbiss@fb.com>
Mon, 8 Oct 2018 20:38:50 +0000 (8 13:38 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 8 Oct 2018 20:41:15 +0000 (8 13:41 -0700)
treecaf04d35a9f46ec9e9704ac900eda03b94872645
parentd07c3444c203a1df7a277fdb642cca0ddc5a2074
Fix inlining decider bugs with FCallAwait

Summary:
Fix three inlining bugs
1) InlineSuspend was not handled in pdce-inlining causing assertions and invalid codegen for regions containing inlined FCallAwaits inlined into functions which unconditionally suspend (diff to support this later in stack).
2) FCallAwait was not properly handled everywhere in the inliner (in practice this mostly meant we'd fail to inline it).
3) In the DCE pass we would sometimes erroneously update the markers of DecRef instructions despite not eliding their inline frames. This would lead to an invalid kill-set for the DecRef, causing spurious memory corruption. Diffs later in this stack that trigger more nested inlining exposed this bug.

Reviewed By: ottoni, jano

Differential Revision: D10051729

fbshipit-source-id: 036835983e637687c65a3beab5a6874c8160053f
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/inlining-decider.cpp
hphp/runtime/vm/jit/pdce-inlining.cpp
hphp/runtime/vm/jit/translate-region.cpp