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

Issue 2111923002: [interpreter] Introduce binary op bytecodes for Smi operand. (Closed)

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

Description

[interpreter] Introduce binary op bytecodes for Smi operand. Introduces fused bytecodes for fusing LdaSmi followed by a binary op bytecode. The chosen bytecodes are used frequently in Octane: AddSmi, SubSmi, BitwiseOrSmi, BitwiseAndSmi, ShiftLeftSmi, ShiftRightSmi. There are additional code stubs for these operations that are biased towards both the left hand and right hand operands being Smis. BUG=v8:4280 LOG=N Committed: https://crrev.com/40511877eb2f3c7fdab2d0dd86cc9668e5454cb7 Cr-Commit-Position: refs/heads/master@{#37531}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Tweak a name. #

Total comments: 12

Patch Set 4 : Incorporate review comments. #

Patch Set 5 : Additional peephole optimizer unit tests. #

Patch Set 6 : Remove unnecessary code stubs. Duh! #

Patch Set 7 : Document handlers in interpreter.cc #

Total comments: 2

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+531 lines, -161 lines) Patch
M src/code-stubs.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/bytecode-graph-builder.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 chunk +39 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 1 2 3 4 chunks +50 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-pipeline.h View 1 chunk +15 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-pipeline.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 1 chunk +168 lines, -0 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden View 4 chunks +4 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden View 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BasicLoops.golden View 1 30 chunks +64 lines, -80 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden View 1 1 chunk +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden View 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden View 1 3 chunks +4 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden View 2 chunks +4 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/IfConditions.golden View 1 chunk +3 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden View 1 1 chunk +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden View 6 chunks +12 lines, -18 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Switch.golden View 2 chunks +4 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden View 4 chunks +6 lines, -8 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 3 chunks +22 lines, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-iterator-unittest.cc View 3 chunks +18 lines, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc View 1 2 3 4 2 chunks +83 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (6 generated)
oth
Benedikt, just kicking the tires with this to confirm whether this is an awful idea? ...
4 years, 5 months ago (2016-06-30 13:27:11 UTC) #2
Benedikt Meurer
Great idea, I like it! Should also help to reduce bytecode size in numeric code, ...
4 years, 5 months ago (2016-07-01 04:53:17 UTC) #3
oth
On 2016/07/01 04:53:17, Benedikt Meurer wrote: > Great idea, I like it! Should also help ...
4 years, 5 months ago (2016-07-01 09:11:40 UTC) #4
oth
Ross, PTAL. I've not completed writing tests here. If it looks okay, this'll happen and ...
4 years, 5 months ago (2016-07-04 10:20:15 UTC) #6
rmcilroy
Looks good, a couple of optional suggestions but otherwise interpreter stuff LGTM when tests are ...
4 years, 5 months ago (2016-07-04 12:35:32 UTC) #7
oth
Thanks for the feedback. Comments incorporated. Test to follow. https://codereview.chromium.org/2111923002/diff/40001/src/code-stubs.cc File src/code-stubs.cc (right): https://codereview.chromium.org/2111923002/diff/40001/src/code-stubs.cc#newcode897 src/code-stubs.cc:897: ...
4 years, 5 months ago (2016-07-04 14:56:24 UTC) #8
oth
bmeurer@chromium.org: Please review changes in code-stubs and compiler now it's a bit cleaner. Thanks!
4 years, 5 months ago (2016-07-04 15:48:50 UTC) #10
Benedikt Meurer
Please don't put those operations into code stubs. They will never be used as stubs, ...
4 years, 5 months ago (2016-07-05 03:36:23 UTC) #11
oth
On 2016/07/05 03:36:23, Benedikt Meurer wrote: > Please don't put those operations into code stubs. ...
4 years, 5 months ago (2016-07-05 08:09:41 UTC) #12
Benedikt Meurer
Thanks, LGTM from my side.
4 years, 5 months ago (2016-07-05 09:03:26 UTC) #13
rmcilroy
Still LGTM, thanks. https://codereview.chromium.org/2111923002/diff/120001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/2111923002/diff/120001/src/interpreter/interpreter.cc#newcode868 src/interpreter/interpreter.cc:868: __ Goto(&end); Might be worth dispatching ...
4 years, 5 months ago (2016-07-05 09:55:41 UTC) #14
oth
Thanks! https://codereview.chromium.org/2111923002/diff/120001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/2111923002/diff/120001/src/interpreter/interpreter.cc#newcode868 src/interpreter/interpreter.cc:868: __ Goto(&end); On 2016/07/05 09:55:41, rmcilroy wrote: > ...
4 years, 5 months ago (2016-07-05 13:19:35 UTC) #15
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/2111923002/140001
4 years, 5 months ago (2016-07-05 13:20:29 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 5 months ago (2016-07-05 13:44:14 UTC) #19
commit-bot: I haz the power
4 years, 5 months ago (2016-07-05 13:46:25 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/40511877eb2f3c7fdab2d0dd86cc9668e5454cb7
Cr-Commit-Position: refs/heads/master@{#37531}

Powered by Google App Engine
This is Rietveld 408576698