v8/test/unittests/compiler
Benedikt Meurer a15ad0d310 [turbofan] Reduce overhead of megamorphic property accesses.
We had an optimization in Crankshaft where we would call into the
megamorphic handler stub directly if an inline cache was already
found to be megamorphic when it hit the optimizing compiler. This
way we could avoid the dispatch overhead when we know that there's
no point in checking for the other states anyways. However we somehow
missed to port this optimization to TurboFan.

Now this change introduces support to call into LoadIC_Megamorphic and
KeyedLoadIC_Megamorphic directly (plus the trampoline versions), which
saves quite a lot of overhead for the cases where the map/name pair is
found in the megamorphic stub cache, and it's quite a simple change. We
can later extend this to also handle the StoreIC and KeyedStoreIC cases
if that turns out to be beneficial.

This improves the score on the Octane/TypeScript test by around ~2%
and the TypeScript test in the web-tooling-benchmark by around ~4%. On
the ARES-6 Air test the steady state mean improves by 2-4%, and on the
ARES-6 ML test the steady state mean seems to also improve by 1-2%, but
that might be within noise.

On a micro-benchmark that just runs `o.x` in a hot loop on a set of 9
different objects, which all have `x` as the first property and are
all in fast mode, we improve by around ~30%, and are now almost on par
with JavaScriptCore.

Bug: v8:6344, v8:6936
Change-Id: Iaa4c6e34c37e78da217ee75f32f6acc95a834250
Reviewed-on: https://chromium-review.googlesource.com/1215623
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55803}
2018-09-11 18:04:01 +00:00
..
arm [CSA] Replace Word32Not with Word32BitwiseNot 2018-08-13 15:23:35 +00:00
arm64 Use TBZ/TBNZ regardless of CanCover() check. 2018-08-22 09:35:34 +00:00
ia32 Fix stack check pattern matching for CSA code 2018-06-14 15:21:53 +00:00
mips MIPS: Disable Word32SarWithWord32Shl on MIPSr1 2018-08-07 09:27:17 +00:00
mips64 Update MIPS file ownership to @wavecomp.com e-mail addresses 2018-07-26 16:28:10 +00:00
ppc PPC/s390: [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-14 12:23:51 +00:00
regalloc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
s390 PPC/s390: [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-14 12:23:51 +00:00
x64 Fix stack check pattern matching for CSA code 2018-06-14 15:21:53 +00:00
branch-elimination-unittest.cc Revert "[TurboFan] Diagnostic code to track down bug in representation selection" 2017-11-14 09:26:51 +00:00
bytecode-analysis-unittest.cc [turbofan] Fix accumulator liveness on suspends 2018-03-22 13:46:04 +00:00
checkpoint-elimination-unittest.cc [turbofan] Rename {CheckPoint} to {Checkpoint} everywhere. 2016-06-01 09:07:19 +00:00
code-assembler-unittest.cc Make CallInterfaceDescriptor isolate-independent 2018-06-18 15:55:53 +00:00
code-assembler-unittest.h [csa] Add constant folding more universally to CodeAssembler operators 2017-09-12 10:03:10 +00:00
common-operator-reducer-unittest.cc [turbofan] Prepare broker for serialization. 2018-07-23 17:20:49 +00:00
common-operator-unittest.cc Reland "[turbofan] Preserve order of compares in switches" 2018-03-02 12:03:42 +00:00
compiler-test-utils.h [turbofan] Drop V8_TURBOFAN_BACKEND and V8_TURBOFAN_TARGET defines. 2015-08-10 07:17:34 +00:00
constant-folding-reducer-unittest.cc [turbofan] Prepare broker for serialization. 2018-07-23 17:20:49 +00:00
control-equivalence-unittest.cc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
control-flow-optimizer-unittest.cc Reland "[turbofan] Preserve order of compares in switches" 2018-03-02 12:03:42 +00:00
dead-code-elimination-unittest.cc Reland^6 "[turbofan] eagerly prune None types and deadness from the graph" 2017-11-16 20:01:22 +00:00
diamond-unittest.cc [cleanup] [compiler] Fix (D)CHECK macros 2017-09-25 10:21:34 +00:00
effect-control-linearizer-unittest.cc [turbolizer] Show for each node from which node it was created from 2018-05-18 14:57:46 +00:00
graph-reducer-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
graph-reducer-unittest.h [turbofan] Add AdvancedReducer::ReplaceWithValue() method and convert JSInlining to an AdvancedReducer. 2015-05-12 12:41:36 +00:00
graph-trimmer-unittest.cc [turbofan] Proper dead code elimination as regular reducer. 2015-06-19 12:07:26 +00:00
graph-unittest.cc [turbofan] Put some tests under a canonical handle scope. 2018-07-31 18:20:53 +00:00
graph-unittest.h [turbofan] Put some tests under a canonical handle scope. 2018-07-31 18:20:53 +00:00
instruction-selector-unittest.cc [wasm simd] Rework CanonicalizeShuffle for testing 2018-07-06 21:13:01 +00:00
instruction-selector-unittest.h Reland "[arm64] Use root register for addressing external references." 2018-07-05 12:39:16 +00:00
instruction-sequence-unittest.cc [turbofan] Change handling of empty basic blocks 2018-06-12 15:10:26 +00:00
instruction-sequence-unittest.h MIPS: Reland of Fix bad RegisterConfiguration usage in InstructionSequence unit tests 2016-12-23 10:51:08 +00:00
instruction-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
int64-lowering-unittest.cc [turbofan] Further optimize DataView accesses. 2018-08-14 09:20:47 +00:00
js-call-reducer-unittest.cc [turbofan] Reduce overhead of megamorphic property accesses. 2018-09-11 18:04:01 +00:00
js-create-lowering-unittest.cc [turbofan] Cleanup JSFunction and NativeContext serialization. 2018-09-03 08:15:10 +00:00
js-intrinsic-lowering-unittest.cc [TurboFan] Broken effect chain in IsInstanceType reduction 2017-10-18 13:50:41 +00:00
js-operator-unittest.cc [TurboFan] Model TypeOf as a simplified operator 2017-10-16 19:15:00 +00:00
js-typed-lowering-unittest.cc [turbofan] Introduce a pure StringConcat operator. 2018-09-07 13:06:09 +00:00
linkage-tail-call-unittest.cc Reland "[arm64] Preparation for padding of arguments" 2017-12-20 13:50:36 +00:00
live-range-builder.h [turbofan] Make MachineType a pair of enums. 2015-12-10 09:03:53 +00:00
load-elimination-unittest.cc [turbofan] Handle LoadField with type mismatch in LoadElimination. 2018-08-24 13:43:54 +00:00
loop-peeling-unittest.cc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
machine-operator-reducer-unittest.cc [ubsan] Fix many static_cast<int32_t> with undefined behavior 2018-04-17 02:02:18 +00:00
machine-operator-unittest.cc [cleanup] Remove more OpParameter 2018-03-21 17:02:39 +00:00
node-cache-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
node-matchers-unittest.cc [turbofan] Relax limitation for using BaseWithIndexAndDisplacement for load/stores 2017-02-24 06:38:14 +00:00
node-properties-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
node-test-utils.cc [turbofan] Introduce a pure StringConcat operator. 2018-09-07 13:06:09 +00:00
node-test-utils.h [turbofan] Introduce a pure StringConcat operator. 2018-09-07 13:06:09 +00:00
node-unittest.cc [jumbo] fix another set of unittest compilation errors 2017-10-19 09:15:44 +00:00
opcodes-unittest.cc [unittests] Reduce compilation overhead of opcodes-unittest.cc. 2016-09-13 05:16:18 +00:00
persistent-unittest.cc [turbofan] PersistentMap: Allow hash values larger than 32bit and some cleanup 2018-01-18 13:58:15 +00:00
schedule-unittest.cc [jumbo] fix android/windows kDummyOperator collision 2017-10-20 12:43:57 +00:00
scheduler-rpo-unittest.cc Replace SmartPointer<T> with unique_ptr<T> 2016-07-25 11:14:34 +00:00
scheduler-unittest.cc Reland "Introduce StdoutStream which prints to Android log or stdout" 2018-06-14 13:29:01 +00:00
simplified-lowering-unittest.cc [turbofan] Introduce JS heap broker. 2018-06-07 07:45:16 +00:00
simplified-operator-reducer-unittest.cc [turbofan] Prepare broker for serialization. 2018-07-23 17:20:49 +00:00
simplified-operator-unittest.cc [jumbo] fix another set of unittest compilation errors 2017-10-19 09:15:44 +00:00
state-values-utils-unittest.cc Enable clang's -Wunreachable-code warning. 2017-12-04 13:09:25 +00:00
typed-optimization-unittest.cc Move CompilationDependencies into compiler. 2018-07-06 13:32:02 +00:00
typer-unittest.cc [turbofan] Prepare broker for serialization. 2018-07-23 17:20:49 +00:00
value-numbering-reducer-unittest.cc [jumbo] fix another set of unittest compilation errors 2017-10-19 09:15:44 +00:00
zone-stats-unittest.cc Named all zones in the project 2016-10-17 12:12:42 +00:00