v8/test/cctest/interpreter
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
..
bytecode_expectations [turbofan] Introduce InstanceOfIC to collect rhs feedback. 2017-10-23 10:15:36 +00:00
bytecode-expectations-printer.cc [interpreter] printing: output the native context index as string 2017-09-05 12:57:09 +00:00
bytecode-expectations-printer.h [objects.h splitting] Move Code & related classes. 2017-10-13 14:22:11 +00:00
generate-bytecode-expectations.cc [api] Mark non-Isolate constructors of String::Utf8Value/Value for deprecation 2017-08-29 17:42:34 +00:00
interpreter-tester.cc [presubmit] Enable and fix "build/namespaces" linter check. 2017-09-04 11:24:26 +00:00
interpreter-tester.h [objects] Remove obsolete uses of {ReplaceCode} methods. 2017-09-28 12:37:46 +00:00
source-position-matcher.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
source-position-matcher.h Use source position table for unoptimized code. 2016-06-28 05:52:52 +00:00
test-bytecode-generator.cc [jumbo] undef some more macros defined in .cc files 2017-09-25 16:37:54 +00:00
test-interpreter-intrinsics.cc Remove SubString intrinsic and convert SubString code stub to CSA. 2017-10-18 05:52:47 +00:00
test-interpreter.cc [turbofan] Introduce InstanceOfIC to collect rhs feedback. 2017-10-23 10:15:36 +00:00
test-source-positions.cc [iwyu] Remove obsolete "api.h" include from "handles-inl.h". 2017-09-11 12:52:20 +00:00