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

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed)

Created:
4 years, 8 months ago by Jarin
Modified:
4 years, 6 months ago
Reviewers:
Benedikt Meurer
CC:
v8-reviews_googlegroups.com, Michael Hablich
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Initial version of number type feedback. This introduces optimized number operations based on type feedback. Summary of changes: 1. Typed lowering produces SpeculativeNumberAdd/Subtract for JSAdd/Subtract if there is suitable feedback. The speculative nodes are connected to both the effect chain and the control chain and they retain the eager frame state. 2. Simplified lowering now executes in three phases: a. Propagation phase computes truncations by traversing the graph from uses to definitions until checkpoint is reached. It also records type-check decisions for later typing phase, and computes representation. b. The typing phase computes more precise types base on the speculative types (and recomputes representation for affected nodes). c. The lowering phase performs lowering and inserts representation changes and/or checks. 3. Effect-control linearization lowers the checks to machine graphs. Notes: - SimplifiedLowering will be refactored to have handling of each operation one place and with clearer input/output protocol for each sub-phase. I would prefer to do this once we have more operations implemented, and the pattern is clearer. - The check operations (Checked<A>To<B>) should have some flags that would affect the kind of truncations that they can handle. E.g., if we know that a node produces a number, we can omit the oddball check in the CheckedTaggedToFloat64 lowering. - In future, we want the typer to reuse the logic from OperationTyper. BUG=v8:4583 LOG=n Committed: https://crrev.com/216bcf9fb3cd1e24e06d594c5f6a2ebfdcf37d1c Cr-Commit-Position: refs/heads/master@{#36674}

Patch Set 1 #

Patch Set 2 : Added typer #

Patch Set 3 : Added checked conversion operators, typer files #

Patch Set 4 : Initial version using int feedback #

Patch Set 5 : Fix the float64 path #

Patch Set 6 : Rename and tweaks #

Patch Set 7 : Add tests for the checks and fix check insertion #

Total comments: 14

Patch Set 8 : Address review comments #

Patch Set 9 : Rebase #

Patch Set 10 : Fix enabling condition #

Patch Set 11 : Rebase #

Patch Set 12 : Rebase #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2030 lines, -354 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -10 lines 0 comments Download
M src/compiler/effect-control-linearizer.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -1 line 0 comments Download
M src/compiler/effect-control-linearizer.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +192 lines, -0 lines 0 comments Download
M src/compiler/js-inlining.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-operator.h View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M src/compiler/js-operator.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/js-typed-lowering.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +99 lines, -13 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
A src/compiler/operation-typer.h View 1 2 1 chunk +79 lines, -0 lines 0 comments Download
A src/compiler/operation-typer.cc View 1 2 1 chunk +341 lines, -0 lines 0 comments Download
M src/compiler/operator-properties.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +12 lines, -2 lines 0 comments Download
M src/compiler/representation-change.h View 1 2 3 4 4 chunks +94 lines, -4 lines 0 comments Download
M src/compiler/representation-change.cc View 1 2 3 4 5 6 7 8 13 chunks +195 lines, -57 lines 0 comments Download
M src/compiler/simplified-lowering.h View 1 3 chunks +8 lines, -1 line 0 comments Download
M src/compiler/simplified-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 55 chunks +513 lines, -170 lines 0 comments Download
M src/compiler/simplified-operator.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -0 lines 0 comments Download
M src/compiler/simplified-operator.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +39 lines, -1 line 0 comments Download
M src/compiler/type-hint-analyzer.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/type-hints.h View 2 chunks +13 lines, -1 line 0 comments Download
M src/compiler/type-hints.cc View 2 chunks +30 lines, -2 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +24 lines, -1 line 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 1 2 3 4 5 6 7 8 17 chunks +126 lines, -86 lines 0 comments Download
A test/mjsunit/compiler/turbo-number-feedback.js View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
M test/unittests/compiler/js-typed-lowering-unittest.cc View 1 2 3 4 5 2 chunks +49 lines, -2 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +15 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +61 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (15 generated)
Jarin
Benedikt, could you start looking at this? I am sure there will be some discussion, ...
4 years, 6 months ago (2016-05-30 12:06:43 UTC) #8
Benedikt Meurer
First round of comments. My mind just exploded while reviewing SimplifiedLowering and RepresentationChange, so more ...
4 years, 6 months ago (2016-05-30 18:39:51 UTC) #9
Jarin
https://codereview.chromium.org/1921563002/diff/120001/src/compiler/effect-control-linearizer.cc File src/compiler/effect-control-linearizer.cc (right): https://codereview.chromium.org/1921563002/diff/120001/src/compiler/effect-control-linearizer.cc#newcode860 src/compiler/effect-control-linearizer.cc:860: // TODO(jarin) Truncate undefined (and null?) here. On 2016/05/30 ...
4 years, 6 months ago (2016-05-31 20:28:53 UTC) #10
Benedikt Meurer
lgtm
4 years, 6 months ago (2016-06-02 08:16:01 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921563002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921563002/200001
4 years, 6 months ago (2016-06-02 08:16:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921563002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921563002/220001
4 years, 6 months ago (2016-06-02 08:32:12 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_nodcheck_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel_ng/builds/2548) v8_linux_nodcheck_rel_ng_triggered on tryserver.v8 (JOB_FAILED, ...
4 years, 6 months ago (2016-06-02 08:49:24 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921563002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921563002/240001
4 years, 6 months ago (2016-06-02 08:56:02 UTC) #21
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 6 months ago (2016-06-02 09:20:57 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 09:23:22 UTC) #25
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/216bcf9fb3cd1e24e06d594c5f6a2ebfdcf37d1c
Cr-Commit-Position: refs/heads/master@{#36674}

Powered by Google App Engine
This is Rietveld 408576698