v8/test/unittests/compiler
Benedikt Meurer bcee140617 [turbofan] Introduce InstanceOfIC to collect rhs feedback.
This adds a new InstanceOfIC where the TestInstanceOf bytecode collects
constant feedback about the right-hand side of instanceof operators,
including both JSFunction and JSBoundFunction instances. TurboFan then
uses the feedback to optimize instanceof in places where the right-hand
side is not a known constant (known to TurboFan).

This addresses the odd performance cliff that we see with instanceof in
functions with multiple closures. It was discovered as one of the main
bottlenecks on the uglify-es test in the web-tooling-benchmark. The
uglify-es test (run in separation) is ~18% faster with this change.

On the micro-benchmark in the tracking bug we go from

  instanceofSingleClosure_Const: 69 ms.
  instanceofSingleClosure_Class: 246 ms.
  instanceofMultiClosure: 246 ms.
  instanceofParameter: 246 ms.

to

  instanceofSingleClosure_Const: 70 ms.
  instanceofSingleClosure_Class: 75 ms.
  instanceofMultiClosure: 76 ms.
  instanceofParameter: 73 ms.

boosting performance by roughly 3.6x and thus effectively removing the
performance cliff around instanceof.

Bug: v8:6936, v8:6971
Change-Id: Ib88dbb9eaef9cafa4a0e260fbbde73427a54046e
Reviewed-on: https://chromium-review.googlesource.com/730686
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48820}
2017-10-23 10:15:36 +00:00
..
arm [turbofan] Fix arm backend matching of (x >>> 24) & 0xffff. 2017-08-31 13:50:07 +00:00
arm64 [base] Generalize bits::CountPopulation 2017-10-18 16:16:15 +00:00
ia32 [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-13 11:44:07 +00:00
mips [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-13 11:44:07 +00:00
mips64 [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-13 11:44:07 +00:00
ppc PPC/s390: [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-14 12:23:51 +00:00
regalloc [cleanup] [compiler] Fix (D)CHECK macros 2017-09-25 10:21:34 +00:00
s390 PPC/s390: [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-14 12:23:51 +00:00
x64 [turbofan] Enable complex memory operands for binops on ia32/x64 2017-03-13 08:50:54 +00:00
branch-elimination-unittest.cc [turbofan] Support variable size argument removal in TF-generated functions 2016-11-02 13:15:57 +00:00
bytecode-analysis-unittest.cc [turbofan] Never generate loop exit phis for the accumulator 2017-08-17 05:09:31 +00:00
checkpoint-elimination-unittest.cc [turbofan] Rename {CheckPoint} to {Checkpoint} everywhere. 2016-06-01 09:07:19 +00:00
code-assembler-unittest.cc Remove ComputeFlags, simply pass in Code::Kind instead of Code::Flags 2017-09-29 15:37:27 +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 [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
common-operator-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
compiler-test-utils.h
control-equivalence-unittest.cc This CL enables precise source positions for all V8 compilers. It merges compiler::SourcePosition and internal::SourcePosition to a single class used throughout the codebase. The new internal::SourcePosition instances store an id identifying an inlined function in addition to a script offset. 2016-11-14 17:22:32 +00:00
control-flow-optimizer-unittest.cc [turbofan] Move TryCloneBranch in the EffectControlLinearizer pass. 2016-07-12 15:23:36 +00:00
dead-code-elimination-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
diamond-unittest.cc [cleanup] [compiler] Fix (D)CHECK macros 2017-09-25 10:21:34 +00:00
effect-control-linearizer-unittest.cc [turbofan] Elide redundant {IfSuccess} control projections. 2017-03-15 09:26:18 +00:00
graph-reducer-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
graph-reducer-unittest.h
graph-trimmer-unittest.cc
graph-unittest.cc [jumbo] fix android/windows kDummyOperator collision 2017-10-20 12:43:57 +00:00
graph-unittest.h [turbofan] Improve typed lowering rules for JSToBoolean. 2016-11-24 06:37:14 +00:00
instruction-selector-unittest.cc Remove compiler distinction from RegisterConfiguration. 2017-08-03 07:47:36 +00:00
instruction-selector-unittest.h [turbofan] Remove ToFloat64AsInt and make ToFloat64 return a Double 2017-07-14 15:01:02 +00:00
instruction-sequence-unittest.cc [cleanup] [compiler] Fix (D)CHECK macros 2017-09-25 10:21:34 +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 [wasm] Introduce the WasmContext 2017-09-28 16:14:03 +00:00
js-builtin-reducer-unittest.cc [TurboFan] Delete AstGraphBuilder. 2017-08-10 15:56:21 +00:00
js-create-lowering-unittest.cc [turbofan] Properly optimize literals in inlined functions. 2017-09-25 13:05:16 +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] Model JSToBoolean as a simplified operator 2017-10-19 08:57:11 +00:00
linkage-tail-call-unittest.cc Fix compilation failure when v8 compiled with GCC 5.x due to -Werror=unused-variable 2016-08-05 12:56:40 +00:00
live-range-builder.h
load-elimination-unittest.cc [turbofan] Fix introduction of contradicting {TypeGuard}. 2017-08-08 11:54:51 +00:00
loop-peeling-unittest.cc [turbofan] Support variable size argument removal in TF-generated functions 2016-11-02 13:15:57 +00:00
machine-operator-reducer-unittest.cc [base] Consolidate IsPowerOfTwo{32,64} and IS_POWER_OF_TWO 2017-07-13 10:49:09 +00:00
machine-operator-unittest.cc [jumbo] fix another set of unittest compilation errors 2017-10-19 09:15:44 +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 [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +00:00
node-test-utils.h [csa] Add constant folding more universally to CodeAssembler operators 2017-09-12 10:03:10 +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 Reland2: [turbofan] staging new implementation of escape analysis 2017-07-31 10:01:07 +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 This CL enables precise source positions for all V8 compilers. It merges compiler::SourcePosition and internal::SourcePosition to a single class used throughout the codebase. The new internal::SourcePosition instances store an id identifying an inlined function in addition to a script offset. 2016-11-14 17:22:32 +00:00
simplified-operator-reducer-unittest.cc [jumbo] add unittests jumbo support 2017-09-28 22:19:40 +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 [turbofan] Sparse representation for state values 2017-01-05 10:44:44 +00:00
typed-optimization-unittest.cc [Turbofan] Model JSToBoolean as a simplified operator 2017-10-19 08:57:11 +00:00
typer-unittest.cc [turbofan] Introduce InstanceOfIC to collect rhs feedback. 2017-10-23 10:15:36 +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