• Seth Brenith's avatar
    Iterate in assembly order for jump threading · fcc81d9a
    Seth Brenith authored
    While reading through the jump threading implementation, I noticed
    something strange: ApplyForwarding iterates through the block list in
    reverse post-order, not in assembly order. Thus, the value prev_fallthru
    might not refer to the previous block in assembly order. Obviously it
    works fine this way or we would have noticed by now, but I think that
    this step would be a little easier to read and reason about if the
    iteration used assembly order instead.
    
    I've added a test case to demonstrate the difference when using
    assembly order: in a diamond where the right side starts with an empty
    deferred block, the current implementation would fail to replace that
    block with a nop. I doubt this case would have any real-world impact.
    
    Change-Id: I28abe2043434debb54896871d15c540ad52c6368
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3039261
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#76067}
    fcc81d9a
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector 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...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...