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

Issue 931623002: [turbofan] Optimize certain chains of Branch into a Switch. (Closed)

Created:
5 years, 10 months ago by Benedikt Meurer
Modified:
5 years, 10 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] Optimize certain chains of Branch into a Switch. This adds a new ControlFlowOptimizer that - for now - recognizes chains of Branches generated by the SwitchBuilder for a subset of javascript switches into Switch nodes. Those Switch nodes are then lowered to either table or lookup switches. Also rename Case to IfValue (and introduce IfDefault) for consistency. BUG=v8:3872 LOG=n Committed: https://crrev.com/acd9c46ca7a0ada723d717f2545fd484c824eaa2 Cr-Commit-Position: refs/heads/master@{#26691}

Patch Set 1 #

Patch Set 2 : Win64. REBASE. #

Patch Set 3 : Unittests. #

Patch Set 4 : REBASE #

Total comments: 12

Patch Set 5 : REBASE #

Patch Set 6 : Addrssed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1122 lines, -168 lines) Patch
M BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/arm/code-generator-arm.cc View 1 3 chunks +31 lines, -14 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 1 chunk +61 lines, -0 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 3 chunks +37 lines, -18 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 chunk +61 lines, -0 lines 0 comments Download
M src/compiler/code-generator.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/common-operator.h View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M src/compiler/common-operator.cc View 1 2 4 chunks +8 lines, -13 lines 0 comments Download
A src/compiler/control-flow-optimizer.h View 1 chunk +52 lines, -0 lines 0 comments Download
A src/compiler/control-flow-optimizer.cc View 1 2 3 4 5 1 chunk +147 lines, -0 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 3 chunks +31 lines, -14 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 chunk +61 lines, -0 lines 0 comments Download
M src/compiler/instruction-codes.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/instruction-selector.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 5 chunks +30 lines, -24 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/operator.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/compiler/operator.cc View 2 chunks +5 lines, -1 line 0 comments Download
M src/compiler/operator-properties.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 3 chunks +17 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 2 1 chunk +17 lines, -6 lines 0 comments Download
M src/compiler/schedule.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/scheduler.cc View 1 2 3 4 5 2 chunks +10 lines, -4 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 2 3 4 1 chunk +4 lines, -8 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 2 chunks +29 lines, -10 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 3 chunks +32 lines, -15 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 2 chunks +66 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 2 chunks +71 lines, -12 lines 0 comments Download
A test/mjsunit/asm/switch.js View 1 chunk +120 lines, -0 lines 0 comments Download
M test/unittests/compiler/common-operator-unittest.cc View 1 2 3 chunks +20 lines, -6 lines 0 comments Download
A test/unittests/compiler/control-flow-optimizer-unittest.cc View 1 2 1 chunk +70 lines, -0 lines 0 comments Download
M test/unittests/compiler/graph-unittest.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 2 3 chunks +88 lines, -0 lines 0 comments Download
M test/unittests/compiler/scheduler-unittest.cc View 1 2 2 chunks +16 lines, -12 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Benedikt Meurer
PTAL
5 years, 10 months ago (2015-02-17 09:24:46 UTC) #2
Michael Starzinger
Looking good from my end. Just a couple of comments. https://codereview.chromium.org/931623002/diff/60001/src/compiler/control-flow-optimizer.cc File src/compiler/control-flow-optimizer.cc (right): https://codereview.chromium.org/931623002/diff/60001/src/compiler/control-flow-optimizer.cc#newcode77 ...
5 years, 10 months ago (2015-02-17 12:23:35 UTC) #3
Benedikt Meurer
Comments addressed. https://codereview.chromium.org/931623002/diff/60001/src/compiler/control-flow-optimizer.cc File src/compiler/control-flow-optimizer.cc (right): https://codereview.chromium.org/931623002/diff/60001/src/compiler/control-flow-optimizer.cc#newcode77 src/compiler/control-flow-optimizer.cc:77: if (if_true->opcode() != IrOpcode::kIfTrue) std::swap(if_true, if_false); On ...
5 years, 10 months ago (2015-02-17 12:30:39 UTC) #4
Michael Starzinger
LGTM from my end.
5 years, 10 months ago (2015-02-17 12:53:38 UTC) #5
Jarin
lgtm
5 years, 10 months ago (2015-02-17 13:27:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/931623002/100001
5 years, 10 months ago (2015-02-17 13:27:48 UTC) #8
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-17 13:29:39 UTC) #9
commit-bot: I haz the power
5 years, 10 months ago (2015-02-17 13:29:55 UTC) #10
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/acd9c46ca7a0ada723d717f2545fd484c824eaa2
Cr-Commit-Position: refs/heads/master@{#26691}

Powered by Google App Engine
This is Rietveld 408576698