Ensure that hhbbc emits contiguous fpi regions
commit471eec0627bb842eb3de873d8781fc20d708e741
authorMark Williams <mwilliams@fb.com>
Sun, 11 Feb 2018 01:38:46 +0000 (10 17:38 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sun, 11 Feb 2018 06:34:58 +0000 (10 22:34 -0800)
tree3a1794cdc0715c0760bdb7b3566ad5a93d37bed2
parentf3d4c36404a2caa8c29f2fe2740f2f9dd29e11cf
Ensure that hhbbc emits contiguous fpi regions

Summary:
If hhbbc can prove that a particular path leaves the fpi region via an
exception, but the FCall* is still reachable, reverse post order
doesn't guarantee that the fpi region is contiguous.

This adds fake edges from any terminal blocks in the fpi region to the
corresponding FCall block (if there is one) to ensure that rpo does
make the region contiguous.

Reviewed By: ricklavoie

Differential Revision: D6959684

fbshipit-source-id: f5d00cedd65be5355a5fa1d4454bb37212d25df7
hphp/hhbbc/emit.cpp
hphp/test/slow/hhbbc/fpi_unreachable_002.php [new file with mode: 0644]
hphp/test/slow/hhbbc/fpi_unreachable_002.php.expect [new file with mode: 0644]