Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Issue 1132423004: [turbofan] Add a Simplified::CheckMaps instruction.

Created:
5 years, 7 months ago by titzer
Modified:
5 years, 7 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Add a Simplified::CheckMaps instruction. CheckMaps nodes take a receiver and a fixed number of map values as value inputs and perform a load and a map check against the list of map values, deoptimizing if the receiver object does not have one of the given maps. They're essentially a compressed form of the hand-written map check that is currently inserted by type feedback specialization. The idea is that CheckMaps encode higher-level information that can be used in optimization and can guard loads or stores. They are lowered during simplified lowering to corresponding machine-level nodes. R=mstarzinger@chromium.org,bmeurer@chromium.org BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -75 lines) Patch
M src/compiler/js-type-feedback.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/js-type-feedback.cc View 5 chunks +16 lines, -59 lines 0 comments Download
M src/compiler/opcodes.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/operator-properties.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/simplified-lowering.h View 3 chunks +4 lines, -0 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 6 chunks +75 lines, -12 lines 0 comments Download
M src/compiler/simplified-operator.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/simplified-operator.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 2 chunks +10 lines, -1 line 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 chunk +3 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 chunk +47 lines, -0 lines 0 comments Download
A test/unittests/compiler/simplified-lowering-unittest.cc View 1 chunk +156 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Benedikt Meurer
As discussed offline yesterday, I'd be happy if we can think about this and explore ...
5 years, 7 months ago (2015-05-20 04:18:06 UTC) #2
Benedikt Meurer
As discussed offline yesterday, I'd be happy if we can think about this and explore ...
5 years, 7 months ago (2015-05-20 04:18:08 UTC) #3
titzer
5 years, 7 months ago (2015-05-20 06:38:08 UTC) #4
On 2015/05/20 04:18:08, Benedikt Meurer wrote:
> As discussed offline yesterday, I'd be happy if we can think about this and
> explore more options first. I don't think we have reached consensus about the
> way we want to propagate and consume type feedback yet. And - correct me if
I'm
> wrong - I think we don't need to tackle this now, since we should first focus
on
> stuff that does not require hard deoptimization for TurboFan and especially
> stuff that doesn't require embedding maps into optimized code.

I agree that we need to pursue context-independent compilation to make cacheable
code. But the other long term strategy is to generate better code than
CrankShaft for the throughput benchmarks, and we'll need to use many of the same
tricks.

> So I'd vote not to land anything that goes into this direction now, and focus
on
> the other two areas of interest for now, namely native code execution for the
> web and regular JavaScript w/o deopting/context dependencies.

This a mechanism CL, not a policy CL. As mentioned above, we'll want to do
guarded fast property loads that deopt on failure in the future. We'll also want
to do guarded fast property loads that have a slow path in the nearer future.
The policy for which guards (that deopt) to insert and where (currently in
JSTypeFeedbackSpecialization) based on what feedback needs some work. That's
longer term, but having the mechanism in place, tested would be nice.

Powered by Google App Engine
This is Rietveld 408576698