Fix bug involving inlining and bytecode control flow
commitf5efb6985f8b83a0eaaf2d5b4fe92ecaaeda2b95
authorGuilherme Ottoni <ottoni@fb.com>
Sat, 24 Jan 2015 02:19:15 +0000 (23 18:19 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 27 Jan 2015 01:00:32 +0000 (26 17:00 -0800)
treef95d988ac435ff886d1a4c08898da83c4c77093a
parent163f4e5a3b5dc17c5c0e0db64089f44a3da15f9c
Fix bug involving inlining and bytecode control flow

Summary: With bytecode control flow, a DefSP is inserted at merge points.  But
if inlining happens in one of the branches, that makes the ReDefSP at
the end of the inlined body appear unused, and it can be DCE'd away,
causing rbx not to be adjusted on that path.  This diff fixes the
problem by replacing that ReDefSP with a ResetSP, which basically does
the same thing but is not a candidate to DCE.

Reviewed By: @jdelong

Differential Revision: D1801432
hphp/doc/ir.specification
hphp/runtime/vm/jit/alias-class.cpp
hphp/runtime/vm/jit/code-gen-arm.cpp
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/extra-data.h
hphp/runtime/vm/jit/frame-state.cpp
hphp/runtime/vm/jit/irgen-inlining.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/prediction-opts.cpp
hphp/runtime/vm/jit/reg-alloc.cpp