• Paolo Severini's avatar
    [test][turbofan] Add %ObserveNode intrinsic for node-specific tests · 4e9f6513
    Paolo Severini authored
    (Initially copied from nicohartmann@ CL
    https://chromium-review.googlesource.com/c/v8/v8/+/2135631)
    
    This CL adds a new intrinsic %ObserveNode(expr) which has noop semantics
    but triggers the new NodeObserver set on the OptimizedCompilationInfo
    when the node generated for expr is created or changed in any phase
    (until EffectControlLinearization).
    
    This provides the infrastructure to write reasonable unit tests that
    check for the construction of or lowering to specific nodes (e.g.
    depending on feedback).
    
    When %ObserveNode(expr) is used an object of class ObserveNodeManager is
    registered to every Reducer/GraphReducer and is notified by the Reducer
    with all node changes. The same logic is added to classes
    SimplifiedLowering/RepresentationSelector, which do not inherit from
    class Reducer.
    
    Observed Node modifications currently are:
     * The Node Operator
     * The Node type
     * Node replacements
    
    A first use case (cctest/test-sloppy-equality.cc) is included in this CL.
    
    Change-Id: Idc5a5e38af8b1d9a2ec5021bf821c4e4e1406220
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555219
    Commit-Queue: Paolo Severini <paolosev@microsoft.com>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#72331}
    4e9f6513
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.cc Loading commit data...
node-observer-tester.h Loading commit data...
serializer-tester.cc 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-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-intrinsics.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...
value-helper.cc Loading commit data...
value-helper.h Loading commit data...