Tweak wholecfg region former, and fix a bug in translateRegion
Summary: This diff makes 2 tweaks to wholecfg region formation:
- stop a region when reaching a SrcKey that has already been optimized
- regionize a function in increasing order of bytecode offsets, so
that we start from the the function body
These changes exposed a bug in translateRegion when running unit
tests, where a fall-through jump was incorrectly going to the next
region block. This was due to the use of the nextOffset in the
NormalizedInstruction, which should only be used to enable jump
flipping in hottrace mode. So add an assert to make sure this field
isn't used with bytecode control flow.
Reviewed By: @bertmaher
Differential Revision:
D1590831