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

Issue 1985753002: [interpreter] Introduce fused bytecodes for common sequences. (Closed)

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

Description

[interpreter] Introduce fused bytecodes for common sequences. This change introduces five fused bytecodes for common bytecode sequences on popular websites. These are LdrNamedProperty, LdrKeyedProperty, LdrGlobal, LdrContextSlot, and LdrUndefined. These load values into a destination register operand instead of the accumulator. They are emitted by the peephole optimizer. BUG=v8:4280 LOG=N Committed: https://crrev.com/25b3fe7961fce1dd39a21b0f717750a926eeb681 Cr-Commit-Position: refs/heads/master@{#36507}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Less is more. #

Patch Set 3 : nit. #

Total comments: 4

Patch Set 4 : Don't differentiate between source position types. #

Patch Set 5 : Remove Change Remove -> Remove Remove Change. #

Patch Set 6 : Rebase onto oth-0058-peephole-fix. #

Total comments: 29

Patch Set 7 : Rebase. #

Patch Set 8 : Incorporate review comments. #

Patch Set 9 : I see your build failures and raise you a rebase. #

Total comments: 6

Patch Set 10 : Fix DCHECK. #

Patch Set 11 : Incorporate review comments. #

Patch Set 12 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+993 lines, -952 lines) Patch
M src/compiler/bytecode-graph-builder.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 4 5 6 7 7 chunks +57 lines, -18 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -1 line 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +116 lines, -26 lines 0 comments Download
M src/interpreter/bytecode-pipeline.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-pipeline.cc View 1 2 3 4 5 2 chunks +27 lines, -8 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 4 chunks +15 lines, -1 line 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download
M src/interpreter/interpreter.h View 1 2 3 4 5 2 chunks +23 lines, -18 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 18 chunks +109 lines, -43 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallGlobal.golden View 2 chunks +6 lines, -10 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallNew.golden View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -9 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 1 chunk +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden View 1 5 chunks +5 lines, -8 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden View 1 2 3 4 5 8 chunks +11 lines, -12 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden View 1 2 3 4 5 5 chunks +6 lines, -9 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ContextVariables.golden View 3 chunks +5 lines, -8 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden View 1 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden View 2 chunks +3 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Delete.golden View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/DoExpression.golden View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForIn.golden View 1 2 3 4 5 2 chunks +9 lines, -11 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForOf.golden View 1 27 chunks +58 lines, -78 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden View 2 chunks +4 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Generators.golden View 1 2 3 4 5 6 7 8 28 chunks +58 lines, -91 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/GlobalDelete.golden View 4 chunks +10 lines, -16 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden View 2 chunks +6 lines, -10 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/PropertyCall.golden View 1 4 chunks +7 lines, -11 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden View 1 2 3 4 5 3 chunks +260 lines, -517 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden View 1 chunk +2 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 chunks +8 lines, -1 line 0 comments Download
M test/unittests/interpreter/bytecode-array-iterator-unittest.cc View 1 2 chunks +10 lines, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc View 1 2 3 4 5 6 7 1 chunk +139 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (19 generated)
oth
Ross, PTAL, thanks.
4 years, 7 months ago (2016-05-17 09:06:06 UTC) #2
rmcilroy
https://codereview.chromium.org/1985753002/diff/1/src/compiler/bytecode-graph-builder.cc File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/1985753002/diff/1/src/compiler/bytecode-graph-builder.cc#newcode1440 src/compiler/bytecode-graph-builder.cc:1440: Node* node = NewNode(op, context); Could we factor out ...
4 years, 7 months ago (2016-05-17 15:49:34 UTC) #3
rmcilroy
One more request: https://codereview.chromium.org/1985753002/diff/1/src/interpreter/bytecodes.h File src/interpreter/bytecodes.h (right): https://codereview.chromium.org/1985753002/diff/1/src/interpreter/bytecodes.h#newcode134 src/interpreter/bytecodes.h:134: V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ Could we ...
4 years, 7 months ago (2016-05-18 16:09:42 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985753002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985753002/20001
4 years, 7 months ago (2016-05-18 19:25:54 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-18 19:56:37 UTC) #10
oth
Thanks for the comments. All incorporated except for the side from the suggestions around CanElideCurrent. ...
4 years, 7 months ago (2016-05-18 20:22:25 UTC) #11
rmcilroy
Pausing this review for now since you mention you prefer the table approach - let ...
4 years, 7 months ago (2016-05-19 10:01:02 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985753002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985753002/80001
4 years, 7 months ago (2016-05-19 10:32:05 UTC) #17
oth
Breaking the table approach into multiple pieces is going to be a tonne of work ...
4 years, 7 months ago (2016-05-19 10:35:23 UTC) #18
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-19 11:05:04 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985753002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985753002/100001
4 years, 7 months ago (2016-05-23 10:11:35 UTC) #22
oth
mstarzinger@chromium.org: Please review any and all changes here, but particularly the BytecodeGraphBuilder changes. rmcilroy@chromium.org: the ...
4 years, 7 months ago (2016-05-23 10:22:38 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-23 10:42:48 UTC) #26
rmcilroy
Looks great, just nits other than the typo in bytecode-graph-builder.cc. LGTM once they are addressed. ...
4 years, 7 months ago (2016-05-24 10:53:57 UTC) #27
oth
Thanks, very useful. The snafu with the typeof could have been ugly. All incorporate with ...
4 years, 7 months ago (2016-05-24 13:37:12 UTC) #28
rmcilroy
LGTM. https://codereview.chromium.org/1985753002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1985753002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc#newcode97 src/interpreter/bytecode-peephole-optimizer.cc:97: void BytecodePeepholeOptimizer::TryToRemoveLastExpressionPosition( On 2016/05/24 13:37:12, oth wrote: > ...
4 years, 7 months ago (2016-05-24 14:00:11 UTC) #29
oth
Done. Thanks! https://codereview.chromium.org/1985753002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1985753002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc#newcode230 src/interpreter/bytecode-peephole-optimizer.cc:230: bool BytecodePeepholeOptimizer::UpdateLastAndCurrentBytecodes( On 2016/05/24 14:00:10, rmcilroy wrote: ...
4 years, 7 months ago (2016-05-24 15:07:15 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985753002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985753002/200001
4 years, 7 months ago (2016-05-24 15:11:49 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-24 15:51:49 UTC) #34
Michael Starzinger
LGTM on "compiler".
4 years, 7 months ago (2016-05-25 08:47:36 UTC) #35
oth
Thanks for the reviews. Chocks away!
4 years, 7 months ago (2016-05-25 09:17:51 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985753002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985753002/220001
4 years, 7 months ago (2016-05-25 09:23:29 UTC) #39
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 7 months ago (2016-05-25 09:55:32 UTC) #41
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 09:56:59 UTC) #43
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/25b3fe7961fce1dd39a21b0f717750a926eeb681
Cr-Commit-Position: refs/heads/master@{#36507}

Powered by Google App Engine
This is Rietveld 408576698