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

Issue 2393683004: [Interpreter] Optimize the Register Optimizer. (Closed)

Created:
4 years, 2 months ago by rmcilroy
Modified:
4 years, 1 month ago
Reviewers:
mythria, Leszek Swirski
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Optimize the Register Optimizer. Modify the Bytecode Register Optimizer to be an independent component rather than part of the BytecodePipeline. This means the BytecodeArrayBuilder can explicitly call it with register operands when outputting a bytecode and the Bytecode Register Optimizer doesn't need to work out which operands are register operands. This also means we don't need to build BytecodeNodes for Ldar / Star / Mov bytecodes unless they are actually emitted by the optimizer. This change also modifies the way the BytecodeArrayBuilder converts operands to make use of the OperandTypes specified in bytecodes.h. This avoids having to individually convert operands to their raw output value before calling Output(...). BUG=v8:4280 Committed: https://crrev.com/ed7bef5b91a70c8bed86e066726ca1cdfc777a96 Cr-Commit-Position: refs/heads/master@{#40543}

Patch Set 1 #

Patch Set 2 : Fix unused variable in test #

Total comments: 17

Patch Set 3 : Test windows #

Patch Set 4 : Leszek's comments #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -900 lines) Patch
M src/interpreter/bytecode-array-builder.h View 1 2 3 4 5 chunks +22 lines, -31 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 28 chunks +340 lines, -291 lines 0 comments Download
M src/interpreter/bytecode-operands.h View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 1 2 3 6 chunks +6 lines, -7 lines 0 comments Download
M src/interpreter/bytecode-pipeline.h View 1 2 3 4 8 chunks +29 lines, -72 lines 0 comments Download
M src/interpreter/bytecode-pipeline.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M src/interpreter/bytecode-register-optimizer.h View 1 2 3 4 4 chunks +58 lines, -46 lines 0 comments Download
M src/interpreter/bytecode-register-optimizer.cc View 1 2 3 4 6 chunks +42 lines, -219 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-writer-unittest.cc View 2 chunks +7 lines, -7 lines 0 comments Download
M test/unittests/interpreter/bytecode-dead-code-optimizer-unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc View 14 chunks +21 lines, -22 lines 0 comments Download
M test/unittests/interpreter/bytecode-pipeline-unittest.cc View 2 chunks +10 lines, -19 lines 0 comments Download
M test/unittests/interpreter/bytecode-register-optimizer-unittest.cc View 1 3 chunks +64 lines, -132 lines 0 comments Download
M test/unittests/interpreter/bytecodes-unittest.cc View 1 chunk +4 lines, -32 lines 0 comments Download

Messages

Total messages: 31 (21 generated)
rmcilroy
This gives another bump in compile time. PTAL, thanks.
4 years, 2 months ago (2016-10-05 16:14:52 UTC) #9
Leszek Swirski
Optimizing the optimizer? We need to go deeper. https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc#newcode102 src/interpreter/bytecode-array-builder.cc:102: !Bytecodes::IsWithoutExternalSideEffects(bytecode)) ...
4 years, 2 months ago (2016-10-06 10:35:17 UTC) #12
rmcilroy
https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc#newcode102 src/interpreter/bytecode-array-builder.cc:102: !Bytecodes::IsWithoutExternalSideEffects(bytecode)) { On 2016/10/06 10:35:17, Leszek Swirski wrote: > ...
4 years, 2 months ago (2016-10-06 17:14:43 UTC) #14
Leszek Swirski
https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc#newcode51 src/interpreter/bytecode-array-builder.cc:51: pipeline_); I don't love that both this class and ...
4 years, 2 months ago (2016-10-07 08:34:10 UTC) #18
mythria
Great. It took me a bit of time to understand OperandHelper :) lgtm.
4 years, 2 months ago (2016-10-07 14:42:14 UTC) #19
rmcilroy
PTAL Leszek. https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/2393683004/diff/40001/src/interpreter/bytecode-array-builder.cc#newcode51 src/interpreter/bytecode-array-builder.cc:51: pipeline_); On 2016/10/07 08:34:10, Leszek Swirski wrote: ...
4 years, 1 month ago (2016-10-24 16:27:55 UTC) #20
Leszek Swirski
lgtm
4 years, 1 month ago (2016-10-24 16:29:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2393683004/100001
4 years, 1 month ago (2016-10-24 20:42:24 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 1 month ago (2016-10-24 20:47:45 UTC) #29
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:11:38 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ed7bef5b91a70c8bed86e066726ca1cdfc777a96
Cr-Commit-Position: refs/heads/master@{#40543}

Powered by Google App Engine
This is Rietveld 408576698