Fix second-pass CSE
commit137afa68a74d0886a13f7e6537fa4936d5968a82
authorBert Maher <bertrand@fb.com>
Mon, 31 Mar 2014 17:33:31 +0000 (31 10:33 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 4 Apr 2014 17:04:23 +0000 (4 10:04 -0700)
tree9409830b762c9e070ae8b3a4e30575efeaea4c8c
parent74f8ce2f05b26fe0b558026340313512f8f68b6e
Fix second-pass CSE

During reoptimize we remove instructions from their block
before optimizing and re-appending them, so it always fails when we
CSE checks to see if an intruction's block is dominated by an
available expression.

The simplest solution seemed to be passing in the instruction's source
block along with the dominator list.

Reviewed By: @swtaarrs

Differential Revision: D1250860
hphp/runtime/vm/jit/frame-state.cpp
hphp/runtime/vm/jit/frame-state.h
hphp/runtime/vm/jit/ir-builder.cpp
hphp/runtime/vm/jit/ir-builder.h