• danno's avatar
    [turbofan] Fix phi-hinting problem with deferred blocks · afb0e7a4
    danno authored
    Previously, turbofan selected the gap use from first predecessor block when
    hinting a phi, unless that block was deferred, in which case the gap move from
    the first non-deferred predecessor block was chosen.
    
    This strategy didn't guarantee that an important invariant was maintained: the
    predecessor blocks chosen for hinting phis must preceed the phi's block in the
    rpo ordering. In most cases the strategy worked, since graphs generated by the
    AstGraphBuilder and existing stubs just happened to always generate schedules
    where this rpo ordering property for the first predecessor block, but it is
    quite possible to generate a code stub by hand that doesn't have this property
    (see included test case).
    
    After this CL, the allocator chooses either the the first non-deferred
    "rpo-preceeding" block to be the hinting block, or the first deferred
    "rpo-preceeding" block if that doesn't exist. In all previously-existing code,
    this behavior is the same as the original algorithm, but has the benefit of not
    failing in the register allocator in hand-crafted stubs where all the
    "rpo-preceeding" predecessors are all in deferred code.
    
    Review-Url: https://codereview.chromium.org/2030463003
    Cr-Commit-Position: refs/heads/master@{#36689}
    afb0e7a4
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
fuzzer Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
ignition.gyp Loading commit data...
ignition.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...