v8/test/cctest/compiler
Tobias Tebbi a19c3ffb8f Reland: [csa] verify skipped write-barriers in MemoryOptimizer
With very few exceptions, this verifies all skipped write-barriers in
CSA and Torque, showing that the MemoryOptimizer together with some
type information on the stored value are enough to avoid unsafe skipped
write-barriers.

Changes to CSA:
SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
MemoryOptimizer by default.
Type information about the stored values (TNode<Smi>) is exploited to
safely skip write barriers for stored Smi values.
In some cases, the code is re-structured to make it easier to consume
for the MemoryOptimizer (manual branch and load elimination).

Changes to the MemoryOptimizer:
Improve the MemoryOptimizer to remove write barriers:
- When the store happens to a CSA-generated InnerAllocate, by ignoring
  Bitcasts and additions.
- When the stored value is the HeapConstant of an immortal immovable root.
- When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
- Fast C-calls are treated as non-allocating.
- Runtime calls can be white-listed as non-allocating.

Remaining missing cases:
- C++-style iterator loops with inner pointers.
- Inner allocates that are reloaded from a field where they were just stored
  (for example an elements backing store). Load elimination would fix that.
- Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
  We could handle that in Torque.
- Double-aligned allocations, which are not lowered in the MemoryOptimizer
  but in CSA.

Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
can be handled by overload resolution (in Torque and C++).

Reland Change: Support pointer compression operands.

R=jarin@chromium.org
TBR=mvstanton@chromium.org

Bug: v8:7793
Change-Id: I84e1831eb6bf9be14f36db3f8b485ee4fab6b22e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612904
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61522}
2019-05-15 11:46:30 +00:00
..
c-signature.h [ubsan] Port Object to the new design 2018-12-26 20:54:07 +00:00
call-tester.h [ubsan] Port Object to the new design 2018-12-26 20:54:07 +00:00
code-assembler-tester.h Reland "[nojit] Remove code stubs" 2018-12-07 15:46:17 +00:00
codegen-tester.cc [test] Remove redundant variables in value helpers 2019-02-01 15:00:21 +00:00
codegen-tester.h [cleanup] MachineType 'rep' variables renamed to 'type' 2019-05-15 11:21:53 +00:00
function-tester.cc Reland "[test] Add testing facility for SerializerForBackgroundCompilation" 2019-01-29 13:59:42 +00:00
function-tester.h [turbofan] Put some tests under a canonical handle scope. 2018-07-31 18:20:53 +00:00
graph-and-builders.h [cleanup] Removing GraphBuilderTester class 2019-05-07 09:54:51 +00:00
serializer-tester.cc [test] Add a missing %EnsureFeedbackVector in serializer-tester 2019-05-13 13:53:43 +00:00
serializer-tester.h [turbofan] Don't allocate JSHeapBroker in the zone 2019-05-02 13:02:19 +00:00
test-basic-block-profiler.cc [csa] re-schedule CSA graph 2018-11-13 17:12:01 +00:00
test-branch-combine.cc [test] Remove redundant variables in value helpers 2019-02-01 15:00:21 +00:00
test-code-assembler.cc [cleanup] MachineType 'rep' variables renamed to 'type' 2019-05-15 11:21:53 +00:00
test-code-generator.cc Reland: [csa] verify skipped write-barriers in MemoryOptimizer 2019-05-15 11:46:30 +00:00
test-gap-resolver.cc [cleanup] Remove unneeded Printable wrappers 2018-11-22 10:01:56 +00:00
test-graph-visualizer.cc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
test-instruction-scheduler.cc [turbofan] Implement loop rotation 2018-11-16 13:52:12 +00:00
test-instruction.cc [compiler] Move some files to backend/ directory 2018-11-12 15:06:56 +00:00
test-js-constant-cache.cc [test] Remove redundant variables in value helpers 2019-02-01 15:00:21 +00:00
test-js-context-specialization.cc [cleanup] Removing GraphBuilderTester class 2019-05-07 09:54:51 +00:00
test-js-typed-lowering.cc [turbofan] Remove redundant isolate argument from typers. 2018-09-25 13:00:05 +00:00
test-jump-threading.cc [turbofan] Implement loop rotation 2018-11-16 13:52:12 +00:00
test-linkage.cc Reland "[nojit] Remove code stubs" 2018-12-07 15:46:17 +00:00
test-loop-analysis.cc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
test-machine-operator-reducer.cc [test] Remove redundant variables in value helpers 2019-02-01 15:00:21 +00:00
test-multiple-return.cc [cleanup] Use Vector::begin instead of Vector::start 2019-04-29 12:43:16 +00:00
test-node.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
test-operator.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-representation-change.cc [turbofan] Fix handling of null in -0 == null comparison 2019-05-13 13:35:03 +00:00
test-run-bytecode-graph-builder.cc [tests] Fix cctests to work with lazy feedback allocation 2019-05-09 13:56:51 +00:00
test-run-calls-to-external-references.cc [turbofan] Refactor interface of calling C functions 2019-04-09 13:16:24 +00:00
test-run-deopt.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-intrinsics.cc [cleanup] Don't declare inline runtime functions by default 2018-10-05 13:10:56 +00:00
test-run-jsbranches.cc [turbofan] Remove for-in support from the AstGraphBuilder. 2017-02-08 06:41:42 +00:00
test-run-jscalls.cc [iwyu] api.h iwyu 2018-07-20 11:49:02 +00:00
test-run-jsexceptions.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-jsobjects.cc [explicit isolates] Remove various GetIsolates 2018-07-17 11:56:37 +00:00
test-run-jsops.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-run-load-store.cc [cleanup] MachineType 'rep' variables renamed to 'type' 2019-05-15 11:21:53 +00:00
test-run-machops.cc [cleanup] Removing GraphBuilderTester class 2019-05-07 09:54:51 +00:00
test-run-native-calls.cc [cleanup] Removing GraphBuilderTester class 2019-05-07 09:54:51 +00:00
test-run-retpoline.cc [iwyu] Remove interface-descriptors.h -> macro-assembler.h 2018-11-19 11:02:31 +00:00
test-run-stackcheck.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-tail-calls.cc [iwyu] Remove interface-descriptors.h -> macro-assembler.h 2018-11-19 11:02:31 +00:00
test-run-unwinding-info.cc [cleanup] Make unicode predicate cache tables static 2018-11-14 15:33:45 +00:00
test-run-variables.cc [cleanup] Use Vector::begin instead of Vector::start 2019-04-29 12:43:16 +00:00
value-helper.cc Reland "[test] Avoid unnecessary std::vector allocations" 2017-10-19 08:47:31 +00:00
value-helper.h [test] Modernize value helpers 2019-02-01 12:56:59 +00:00