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

Issue 2118183002: [interpeter] Move to table based peephole optimizer. (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

[interpeter] Move to table based peephole optimizer. Introduces a lookup table for peephole optimizations. Fixes some tests using BytecodePeepholeOptimizer::Write() that should have been update to use BytecodePeepholeOptimizer::WriteJump(). BUG=v8:4280 LOG=N Committed: https://crrev.com/f4234422b93b21a286b0f31799009bcbe8b90b9e Cr-Commit-Position: refs/heads/master@{#37819}

Patch Set 1 #

Patch Set 2 : Minor method definition re-order. #

Patch Set 3 : Remove dead declaration. Minor naming tweaks. #

Patch Set 4 : Add default path check to see if it improves ARM perf. #

Patch Set 5 : Undo experimental in last patch set. #

Total comments: 2

Patch Set 6 : Use base::CallOnce for initialization for MT case. #

Patch Set 7 : Compact rule table 15/118 rows are instantiated. #

Patch Set 8 : De-dupe rows in pairwise optimization table. #

Patch Set 9 : Static initializer removal. #

Patch Set 10 : Unbreak debug build. #

Patch Set 11 : WIP NOT FOR REVIEW - gyp generated table. #

Patch Set 12 : Fix gyp build for android. #

Patch Set 13 : Possible fix for msvc. #

Patch Set 14 : Minor clean-up of mkpeephole.cc. Re-break cross platform build. #

Patch Set 15 : Support native and cross compile (take 2). #

Patch Set 16 : Minor tidy up. #

Patch Set 17 : Rebase #

Patch Set 18 : Attempt gn build. #

Total comments: 6

Patch Set 19 : gyp experiment, gn break #

Patch Set 20 : Experiment with gn. #

Patch Set 21 : toolchain tweak for mkpeephole for bots. #

Patch Set 22 : Rebase and back out patch set 21. #

Total comments: 2

Patch Set 23 : nit. #

Total comments: 4

Patch Set 24 : Rebase onto oth-0078-dependency-factoring #

Patch Set 25 : Attempt to fix android build. #

Patch Set 26 : Actually add dependency on oth-0078-dependency-factoring #

Patch Set 27 : Rebase to fix bytecodes.h #

Patch Set 28 : Another variation on headers in mkpeephole.cc #

Patch Set 29 : Rebase. #

Patch Set 30 : Rebase. #

Patch Set 31 : Minor renaming and re-grouping. #

Total comments: 34

Patch Set 32 : Rebase following revert/reland dependency. #

Patch Set 33 : First pass at comments on patch set 31. #

Patch Set 34 : Fix bad DCHECK. Add a new rule. #

Patch Set 35 : Rebase #

Patch Set 36 : Incorporate review comments. #

Patch Set 37 : Rebase #

Patch Set 38 : No change. Upload to run more CQ tests. #

Patch Set 39 : Enable separate host toolchain for big endian mips. #

Patch Set 40 : Broader check for host and target arch wanting separate toolchain. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+799 lines, -276 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 5 chunks +49 lines, -0 lines 0 comments Download
M gypfiles/standalone.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +1 line, -5 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 3 chunks +13 lines, -16 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 7 chunks +212 lines, -221 lines 0 comments Download
A src/interpreter/bytecode-peephole-table.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +73 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +3 lines, -3 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +5 lines, -5 lines 0 comments Download
A src/interpreter/mkpeephole.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +387 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +41 lines, -0 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ConstVariable.golden View 2 chunks +1 line, -2 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/LetVariable.golden View 2 chunks +1 line, -2 lines 0 comments Download
M test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc View 1 2 3 4 5 6 7 6 chunks +13 lines, -22 lines 0 comments Download

Messages

Total messages: 52 (28 generated)
oth
Ross, PTAL, fewer branches when writing bytecode. The LOC ends up a bit larger and ...
4 years, 5 months ago (2016-07-04 10:28:39 UTC) #2
rmcilroy
https://codereview.chromium.org/2118183002/diff/80001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/2118183002/diff/80001/src/interpreter/bytecode-peephole-optimizer.cc#newcode216 src/interpreter/bytecode-peephole-optimizer.cc:216: PeepholeActionTable::Initialize(); How does this play with threading? There could ...
4 years, 5 months ago (2016-07-04 12:45:46 UTC) #3
oth
On 2016/07/04 12:45:46, rmcilroy wrote: > https://codereview.chromium.org/2118183002/diff/80001/src/interpreter/bytecode-peephole-optimizer.cc > File src/interpreter/bytecode-peephole-optimizer.cc (right): > > https://codereview.chromium.org/2118183002/diff/80001/src/interpreter/bytecode-peephole-optimizer.cc#newcode216 > ...
4 years, 5 months ago (2016-07-04 13:27:29 UTC) #4
oth
Ross, PTAL. The CL now builds the table at compile time via a little helper ...
4 years, 5 months ago (2016-07-08 07:39:37 UTC) #5
rmcilroy
Haven't looked in huge detail yet, but worried about build dependencies. https://codereview.chromium.org/2118183002/diff/340001/BUILD.gn File BUILD.gn (right): ...
4 years, 5 months ago (2016-07-08 13:18:25 UTC) #6
oth
Thanks. https://codereview.chromium.org/2118183002/diff/340001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2118183002/diff/340001/BUILD.gn#newcode1312 BUILD.gn:1312: "$target_gen_dir/bytecode-peephole-table.h", On 2016/07/08 13:18:25, rmcilroy wrote: > I ...
4 years, 5 months ago (2016-07-08 15:12:34 UTC) #7
Michael Achenbach
https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn#newcode1899 BUILD.gn:1899: "//:run_mkpeephole", The // resolve to the project root. That ...
4 years, 5 months ago (2016-07-11 09:11:43 UTC) #9
Michael Achenbach
Please manually select other chromium trybots for larger gn changes, because our gn coverage isn't ...
4 years, 5 months ago (2016-07-11 09:18:48 UTC) #10
oth
On 2016/07/11 09:11:43, Michael Achenbach wrote: > https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn > File BUILD.gn (right): > > https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn#newcode1899 ...
4 years, 5 months ago (2016-07-11 09:20:34 UTC) #11
Michael Achenbach
I added a few more chromium trybots.
4 years, 5 months ago (2016-07-11 09:35:45 UTC) #12
oth
On 2016/07/11 09:35:45, Michael Achenbach wrote: > I added a few more chromium trybots. Thanks ...
4 years, 5 months ago (2016-07-11 10:45:53 UTC) #13
Michael Achenbach
On 2016/07/11 10:45:53, oth wrote: > On 2016/07/11 09:35:45, Michael Achenbach wrote: > > I ...
4 years, 5 months ago (2016-07-11 10:51:34 UTC) #14
Michael Achenbach
For repairing android and maybe windows... https://codereview.chromium.org/2118183002/diff/440001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2118183002/diff/440001/BUILD.gn#newcode2140 BUILD.gn:2140: configs = [ ...
4 years, 5 months ago (2016-07-11 10:54:07 UTC) #15
Michael Achenbach
https://codereview.chromium.org/2118183002/diff/440001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2118183002/diff/440001/BUILD.gn#newcode2143 BUILD.gn:2143: ":v8_libbase", also "//build/win:default_exe_manifest" should be added to deps.
4 years, 5 months ago (2016-07-11 14:08:40 UTC) #16
oth
Thanks Michael, greatly appreciated. https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2118183002/diff/420001/BUILD.gn#newcode1899 BUILD.gn:1899: "//:run_mkpeephole", On 2016/07/11 09:11:42, Michael ...
4 years, 5 months ago (2016-07-12 10:08:53 UTC) #17
Michael Achenbach
gn lg
4 years, 5 months ago (2016-07-12 10:11:38 UTC) #18
rmcilroy
I like it! Thanks for sticking with it, code looks easier to understand to me ...
4 years, 5 months ago (2016-07-13 13:51:41 UTC) #19
oth
Thanks for the comments. Revisions and comments attached. https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (left): https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc#oldcode62 src/interpreter/bytecode-peephole-optimizer.cc:62: // ...
4 years, 5 months ago (2016-07-15 13:09:41 UTC) #30
rmcilroy
lgtm once bots are happy and comments addressed. https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (left): https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc#oldcode62 src/interpreter/bytecode-peephole-optimizer.cc:62: // ...
4 years, 5 months ago (2016-07-15 15:31:49 UTC) #33
oth
Thanks. All done. https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc File src/interpreter/bytecode-peephole-optimizer.cc (right): https://codereview.chromium.org/2118183002/diff/600001/src/interpreter/bytecode-peephole-optimizer.cc#newcode222 src/interpreter/bytecode-peephole-optimizer.cc:222: // Node can not be valid ...
4 years, 5 months ago (2016-07-15 17:27:26 UTC) #34
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/2118183002/730001
4 years, 5 months ago (2016-07-18 08:06:13 UTC) #39
commit-bot: I haz the power
Committed patchset #38 (id:730001)
4 years, 5 months ago (2016-07-18 08:32:50 UTC) #40
commit-bot: I haz the power
Patchset 38 (id:??) landed as https://crrev.com/f4234422b93b21a286b0f31799009bcbe8b90b9e Cr-Commit-Position: refs/heads/master@{#37819}
4 years, 5 months ago (2016-07-18 08:35:08 UTC) #42
oth
4 years, 5 months ago (2016-07-18 08:51:31 UTC) #43
Message was sent while issue was closed.
A revert of this CL (patchset #38 id:730001) has been created in
https://codereview.chromium.org/2161563002/ by oth@chromium.org.

The reason for reverting is: Break MIPS port..

Powered by Google App Engine
This is Rietveld 408576698