v8/test/cctest/compiler
Paolo Severini 4e9f651317 [test][turbofan] Add %ObserveNode intrinsic for node-specific tests
(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: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72331}
2021-01-26 17:38:00 +00:00
..
c-signature.h [zone] Cleanup zone allocations in src/compiler and tests, pt.3 2020-07-10 16:39:05 +00:00
call-tester.h Move handles-related files to src/handles 2019-05-23 06:00:15 +00:00
code-assembler-tester.h Reland "Reland "[deoptimizer] Change deopt entries into builtins"" 2020-10-21 06:01:38 +00:00
codegen-tester.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
codegen-tester.h Reland "Reland "[deoptimizer] Change deopt entries into builtins"" 2020-10-21 06:01:38 +00:00
function-tester.cc Rename legacy code kinds 2020-09-30 15:39:23 +00:00
function-tester.h Move handles-related files to src/handles 2019-05-23 06:00:15 +00:00
graph-and-builders.h [zone] Cleanup zone allocations in src/compiler and tests, pt.3 2020-07-10 16:39:05 +00:00
node-observer-tester.cc [test][turbofan] Add %ObserveNode intrinsic for node-specific tests 2021-01-26 17:38:00 +00:00
node-observer-tester.h [test][turbofan] Add %ObserveNode intrinsic for node-specific tests 2021-01-26 17:38:00 +00:00
serializer-tester.cc [test] Only update FLAG_local_heaps if still disabled 2020-09-22 15:09:38 +00:00
serializer-tester.h [iwyu] Add missing includes of <memory> for std::unique_ptr 2019-09-13 17:13:36 +00:00
test-basic-block-profiler.cc Avoid overflow when profiling builtins 2020-11-19 19:43:37 +00:00
test-branch-combine.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-code-assembler.cc [csa][cleanup] TNodify To<Int32,Int64,IntPtr,Smi>Constant 2020-11-12 16:12:19 +00:00
test-code-generator.cc [csa][cleanup] Remove Sloppy-ness for more classes 2020-11-09 12:33:49 +00:00
test-concurrent-shared-function-info.cc [TurboFan] Transition SharedFunctionInfo to kNeverSerialized (3) 2020-11-30 15:33:15 +00:00
test-gap-resolver.cc [config] Add V8_NODISCARD for Scope classes 2020-11-26 11:08:45 +00:00
test-graph-visualizer.cc Reland "[zone-compr] Introduce ZoneTypeTraits and ZoneCompression" 2020-07-31 11:43:08 +00:00
test-instruction-scheduler.cc Reland "[zone-compr] Introduce ZoneTypeTraits and ZoneCompression" 2020-07-31 11:43:08 +00:00
test-instruction.cc [zone-compr] Add kCompressGraphZone constant 2020-07-24 08:50:11 +00:00
test-js-constant-cache.cc [compiler] Remove persistent handles as a broker parameter 2020-08-13 08:13:33 +00:00
test-js-context-specialization.cc [turbofan] Pierce TypeGuards and FoldConstants in ValueMatcher 2020-10-28 16:33:53 +00:00
test-js-typed-lowering.cc [compiler] Rename type BailoutId to BytecodeOffset 2021-01-20 13:03:41 +00:00
test-jump-threading.cc Augment jump threading to handle redundant returns 2020-07-29 18:36:07 +00:00
test-linkage.cc [factory] Remove deprecated JSFunction ctors 2020-11-11 06:12:35 +00:00
test-loop-analysis.cc [zone-compr] Add kCompressGraphZone constant 2020-07-24 08:50:11 +00:00
test-machine-operator-reducer.cc [compiler] Fix --trace-turbo-reduction in the presence of direct reads 2020-09-11 17:21:43 +00:00
test-multiple-return.cc [tests] Run TestReturnMultipleValuesLargeFrame just once 2020-10-07 14:55:30 +00:00
test-node.cc Reland "[zone-compr] Introduce ZoneTypeTraits and ZoneCompression" 2020-07-31 11:43:08 +00:00
test-operator.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-representation-change.cc [turbofan] Pierce TypeGuards and FoldConstants in ValueMatcher 2020-10-28 16:33:53 +00:00
test-run-bytecode-graph-builder.cc [cleanup] Remove DISALLOW_COPY_AND_ASSIGN in test/{cctest,fuzzer,inspector} 2020-11-10 01:24:43 +00:00
test-run-calls-to-external-references.cc [cleanup][wasm] Replace min/max with std::min/std::max 2020-11-09 01:50:30 +00:00
test-run-deopt.cc Move relevant files to src/execution 2019-05-22 08:36:33 +00:00
test-run-intrinsics.cc [nci] Refactor optimized compilation info flags 2020-06-10 13:46:10 +00:00
test-run-jsbranches.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-run-jscalls.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
test-run-jsexceptions.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-run-jsobjects.cc [keys] Handle RangeError in GetKeysWithPrototypeInfoCache 2020-03-04 13:38:10 +00:00
test-run-jsops.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-run-load-store.cc [ptr-compr] Enable pointer compression on s390x 2020-03-31 17:06:17 +00:00
test-run-machops.cc [mips][turbofan] Fix CheckedFloat64ToInt64 on mips64 2020-12-01 08:59:41 +00:00
test-run-native-calls.cc Reland "Reland "[deoptimizer] Change deopt entries into builtins"" 2020-10-21 06:01:38 +00:00
test-run-retpoline.cc [CSA] Tnodify CodeAssembler::Parameter 2020-10-01 16:07:03 +00:00
test-run-stackcheck.cc Move relevant files to src/execution 2019-05-22 08:36:33 +00:00
test-run-tail-calls.cc [CSA] Tnodify CodeAssembler::Parameter 2020-10-01 16:07:03 +00:00
test-run-unwinding-info.cc Remove --perf-prof flag on non-linux 2020-01-10 13:58:50 +00:00
test-run-variables.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-sloppy-equality.cc [test][turbofan] Add %ObserveNode intrinsic for node-specific tests 2021-01-26 17:38:00 +00:00
value-helper.cc Reland "[test] Avoid unnecessary std::vector allocations" 2017-10-19 08:47:31 +00:00
value-helper.h Reland "Add int64_t min and max to value helpers for test" 2020-10-27 23:20:41 +00:00