• 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
..
c-signature.h Loading commit data...
call-tester.h Loading commit data...
code-assembler-tester.h Loading commit data...
codegen-tester.cc Loading commit data...
codegen-tester.h Loading commit data...
function-tester.cc Loading commit data...
function-tester.h Loading commit data...
graph-and-builders.h Loading commit data...
node-observer-tester.h Loading commit data...
serializer-tester.h Loading commit data...
test-basic-block-profiler.cc Loading commit data...
test-branch-combine.cc Loading commit data...
test-calls-with-arraylike-or-spread.cc Loading commit data...
test-code-assembler.cc Loading commit data...
test-code-generator.cc Loading commit data...
test-concurrent-shared-function-info.cc Loading commit data...
test-gap-resolver.cc Loading commit data...
test-graph-visualizer.cc Loading commit data...
test-instruction-scheduler.cc Loading commit data...
test-instruction.cc Loading commit data...
test-js-constant-cache.cc Loading commit data...
test-js-context-specialization.cc Loading commit data...
test-js-typed-lowering.cc Loading commit data...
test-jump-threading.cc Loading commit data...
test-linkage.cc Loading commit data...
test-loop-analysis.cc Loading commit data...
test-machine-operator-reducer.cc Loading commit data...
test-multiple-return.cc Loading commit data...
test-node.cc Loading commit data...
test-operator.cc Loading commit data...
test-representation-change.cc Loading commit data...
test-run-bytecode-graph-builder.cc Loading commit data...
test-run-calls-to-external-references.cc Loading commit data...
test-run-deopt.cc Loading commit data...
test-run-jsbranches.cc Loading commit data...
test-run-jscalls.cc Loading commit data...
test-run-jsexceptions.cc Loading commit data...
test-run-jsobjects.cc Loading commit data...
test-run-jsops.cc Loading commit data...
test-run-load-store.cc Loading commit data...
test-run-machops.cc Loading commit data...
test-run-native-calls.cc Loading commit data...
test-run-retpoline.cc Loading commit data...
test-run-stackcheck.cc Loading commit data...
test-run-tail-calls.cc Loading commit data...
test-run-unwinding-info.cc Loading commit data...
test-run-variables.cc Loading commit data...
test-sloppy-equality.cc Loading commit data...
test-verify-type.cc Loading commit data...
value-helper.cc Loading commit data...
value-helper.h Loading commit data...