386ff6e5d6
In TurboFan, context specialization is an optimization that tries to either replace the load of a value from the context with a constant, or if that can't be achieved, at least reduce the hops up the context chain by starting a walk to the required depth from the first constant context that it can reach. Currently, this optimization is performed by looking into the heap during a reducer pass. With fully concurrent TurboFan, we need to instead gather information about contexts we may want to perform this optimization on during serialization. This CL adds functionality to the serializer to recognize and model operations that affect the context register. We add to the hinting structure already used by the serializer. There is a new type of hint: a VirtualContext. This is a tuple consisting of a handle to a Context, and a distance field that indicates how far away in a to-be-realized chain this VirtualContext sits from the context in the handle. For example: bytecode stream: ... CreateBlockContext ... After a block context is created, the accumulator now contains a VirtualContext Hint with a distance of 1 from any context hints that we are keeping track of in the current context register. More details in the design doc here: https://docs.google.com/document/d/1Y0LKKCEenLWyAZTetoAIpKTZRCxaNdkYV8X1GaCax2A/edit?usp=sharing Change-Id: I63732ebd106cc138fb1e9789d0676ece63e15d27 Bug: v8:7790 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605941 Commit-Queue: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#62370} |
||
---|---|---|
.. | ||
c-signature.h | ||
call-tester.h | ||
code-assembler-tester.h | ||
codegen-tester.cc | ||
codegen-tester.h | ||
function-tester.cc | ||
function-tester.h | ||
graph-and-builders.h | ||
serializer-tester.cc | ||
serializer-tester.h | ||
test-basic-block-profiler.cc | ||
test-branch-combine.cc | ||
test-code-assembler.cc | ||
test-code-generator.cc | ||
test-gap-resolver.cc | ||
test-graph-visualizer.cc | ||
test-instruction-scheduler.cc | ||
test-instruction.cc | ||
test-js-constant-cache.cc | ||
test-js-context-specialization.cc | ||
test-js-typed-lowering.cc | ||
test-jump-threading.cc | ||
test-linkage.cc | ||
test-loop-analysis.cc | ||
test-machine-operator-reducer.cc | ||
test-multiple-return.cc | ||
test-node.cc | ||
test-operator.cc | ||
test-representation-change.cc | ||
test-run-bytecode-graph-builder.cc | ||
test-run-calls-to-external-references.cc | ||
test-run-deopt.cc | ||
test-run-intrinsics.cc | ||
test-run-jsbranches.cc | ||
test-run-jscalls.cc | ||
test-run-jsexceptions.cc | ||
test-run-jsobjects.cc | ||
test-run-jsops.cc | ||
test-run-load-store.cc | ||
test-run-machops.cc | ||
test-run-native-calls.cc | ||
test-run-retpoline.cc | ||
test-run-stackcheck.cc | ||
test-run-tail-calls.cc | ||
test-run-unwinding-info.cc | ||
test-run-variables.cc | ||
value-helper.cc | ||
value-helper.h |