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

Issue 1998203002: [Interpreter] Preserve source positions in peephole optimizer. (Closed)

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

Description

[Interpreter] Preserve source positions in peephole optimizer. The original peephole optimizer logic in the BytecodeArrayBuilder did not respect source positions as it was written before there were bytecode source positions. This led to some minor differences to FCG and was problematic when combined with pending bytecode optimizations. This change makes the new peephole optimizer fully respect source positions. BUG=v8:4280 LOG=N Committed: https://crrev.com/e43fbde72b38160c4f9860ed4208570b1e1e6ef9 Cr-Commit-Position: refs/heads/master@{#36439}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplify condition. #

Total comments: 2

Patch Set 3 : Eliminate unnecessary expression positions. #

Total comments: 2

Patch Set 4 : Update source position rule table per review. #

Patch Set 5 : Rebase. #

Total comments: 2

Patch Set 6 : Incorporate review comment. #

Patch Set 7 : Nitlet on last patch set. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3518 lines, -3215 lines) Patch
M src/interpreter/bytecode-peephole-optimizer.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 1 2 3 4 5 6 5 chunks +57 lines, -9 lines 0 comments Download
M src/interpreter/bytecode-pipeline.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/bytecode-pipeline.cc View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden View 1 2 1 chunk +256 lines, -256 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden View 1 2 13 chunks +27 lines, -22 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BasicLoops.golden View 1 2 23 chunks +29 lines, -27 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ConstVariable.golden View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ContextParameters.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CountOperators.golden View 1 2 11 chunks +16 lines, -16 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/DeadCodeRemoval.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Delete.golden View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/DoExpression.golden View 1 2 3 chunks +10 lines, -7 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForIn.golden View 1 2 4 chunks +11 lines, -10 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden View 1 2 3 chunks +258 lines, -258 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/IfConditions.golden View 1 2 4 chunks +518 lines, -264 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/IntegerConstants.golden View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden View 1 2 1 chunk +312 lines, -312 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/LetVariable.golden View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden View 1 2 11 chunks +26 lines, -23 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden View 1 2 4 chunks +1024 lines, -1024 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden View 1 2 1 chunk +256 lines, -256 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden View 1 2 13 chunks +15 lines, -14 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden View 1 2 3 chunks +257 lines, -257 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden View 1 2 1 chunk +256 lines, -256 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/StringConstants.golden View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Switch.golden View 1 2 15 chunks +99 lines, -92 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ThisFunction.golden View 1 chunk +2 lines, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Throw.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Typeof.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden View 1 2 6 chunks +8 lines, -7 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/WideRegisters.golden View 1 2 6 chunks +13 lines, -11 lines 0 comments Download
M test/mjsunit/ignition/elided-instruction.js View 2 chunks +5 lines, -9 lines 0 comments Download
D test/mjsunit/ignition/elided-instruction-no-ignition.js View 1 chunk +0 lines, -37 lines 0 comments Download

Messages

Total messages: 29 (9 generated)
oth
Yang, Ross, PTAL, this fixes the expression elision problem that was occurring in the output ...
4 years, 7 months ago (2016-05-20 10:19:33 UTC) #2
rmcilroy
> There is a table based alternative to the peephole optimizer in this CL and ...
4 years, 7 months ago (2016-05-20 11:08:03 UTC) #3
oth
On 2016/05/20 11:08:03, rmcilroy wrote: > > There is a table based alternative to the ...
4 years, 7 months ago (2016-05-20 12:31:01 UTC) #4
rmcilroy
On 2016/05/20 12:31:01, oth wrote: > On 2016/05/20 11:08:03, rmcilroy wrote: > > > There ...
4 years, 7 months ago (2016-05-20 12:55:52 UTC) #5
oth
On 2016/05/20 12:55:52, rmcilroy wrote: > On 2016/05/20 12:31:01, oth wrote: > > On 2016/05/20 ...
4 years, 7 months ago (2016-05-20 14:55:53 UTC) #6
oth
https://codereview.chromium.org/1998203002/diff/1/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/1/src/interpreter/bytecode-peephole-optimizer.cc#newcode170 src/interpreter/bytecode-peephole-optimizer.cc:170: current->source_info() != last_.source_info()) { On 2016/05/20 11:08:03, rmcilroy wrote: ...
4 years, 7 months ago (2016-05-20 14:56:43 UTC) #7
rmcilroy
LGTM https://codereview.chromium.org/1998203002/diff/20001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/20001/src/interpreter/bytecode-peephole-optimizer.cc#newcode170 src/interpreter/bytecode-peephole-optimizer.cc:170: (last_.source_info() == current->source_info()))) { nit - could we ...
4 years, 7 months ago (2016-05-20 16:31:13 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1998203002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1998203002/60001
4 years, 7 months ago (2016-05-21 12:33:02 UTC) #11
oth
Addressed nit. Added extra logic to remove unnecessary expression positions, e..g those that are on ...
4 years, 7 months ago (2016-05-21 12:40:10 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-21 13:05:52 UTC) #15
oth
On 2016/05/21 12:40:10, oth wrote: > Addressed nit. > > Added extra logic to remove ...
4 years, 7 months ago (2016-05-21 14:04:17 UTC) #16
Yang
https://codereview.chromium.org/1998203002/diff/60001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/60001/src/interpreter/bytecode-peephole-optimizer.cc#newcode162 src/interpreter/bytecode-peephole-optimizer.cc:162: // | Expr | YES | NO | MAYBE ...
4 years, 7 months ago (2016-05-23 07:54:20 UTC) #17
oth
Thanks, comment incorporated. https://codereview.chromium.org/1998203002/diff/60001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/60001/src/interpreter/bytecode-peephole-optimizer.cc#newcode162 src/interpreter/bytecode-peephole-optimizer.cc:162: // | Expr | YES | ...
4 years, 7 months ago (2016-05-23 09:05:46 UTC) #18
rmcilroy
LGTM https://codereview.chromium.org/1998203002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc#newcode176 src/interpreter/bytecode-peephole-optimizer.cc:176: // this is not performed here to keep ...
4 years, 7 months ago (2016-05-23 10:59:26 UTC) #19
oth
Thanks, done. https://codereview.chromium.org/1998203002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/1998203002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc#newcode176 src/interpreter/bytecode-peephole-optimizer.cc:176: // this is not performed here to ...
4 years, 7 months ago (2016-05-23 11:22:42 UTC) #20
oth
On 2016/05/23 11:22:42, oth wrote: > Thanks, done. > > https://codereview.chromium.org/1998203002/diff/100001/src/interpreter/bytecode-peephole-optimizer.cc > File src/interpreter/bytecode-peephole-optimizer.cc (right): ...
4 years, 7 months ago (2016-05-23 12:16:49 UTC) #21
Yang
On 2016/05/23 12:16:49, oth wrote: > On 2016/05/23 11:22:42, oth wrote: > > Thanks, done. ...
4 years, 7 months ago (2016-05-23 12:38:52 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1998203002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1998203002/140001
4 years, 7 months ago (2016-05-23 13:00:24 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 7 months ago (2016-05-23 13:31:59 UTC) #27
commit-bot: I haz the power
4 years, 7 months ago (2016-05-23 13:33:33 UTC) #29
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e43fbde72b38160c4f9860ed4208570b1e1e6ef9
Cr-Commit-Position: refs/heads/master@{#36439}

Powered by Google App Engine
This is Rietveld 408576698