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

Issue 2360193003: Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. (Closed)

Created:
4 years, 3 months ago by Michael Hablich
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. (patchset #6 id:200001 of https://codereview.chromium.org/2351763002/ ) Reason for revert: Prime suspect for roll blocker: https://codereview.chromium.org/2362503002/ Original issue's description: > [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. > > This CL optimizes the code in BytecodeArrayBuilder and > BytecodeArrayWriter by making the following main changes: > > - Move operand scale calculation out of BytecodeArrayWriter to the > BytecodeNode constructor, where the decision on which operands are > scalable can generally be statically decided by the compiler. > - Move the maximum register calculation out of BytecodeArrayWriter > and into BytecodeRegisterOptimizer (which is the only place outside > BytecodeGenerator which updates which registers are used). This > avoids the BytecodeArrayWriter needing to know the operand types > of a node as it writes it. > - Modify EmitBytecodes to use individual push_backs rather than > building a buffer and calling insert, since this turns out to be faster. > - Initialize BytecodeArrayWriter's bytecode vector by reserving 512 > bytes, > - Make common functions in Bytecodes constexpr so that they > can be statically calculated by the compiler. > - Move common functions and constructors in Bytecodes and > BytecodeNode to the header so that they can be inlined. > - Change large static switch statements in Bytecodes to const array > lookups, and move to the header to allow inlining. > > I also took the opportunity to remove a number of unused helper > functions, and rework some others for consistency. > > This reduces the percentage of time spent in making BytecodeArrays > in CodeLoad from ~15% to ~11% according to perf. The > CoadLoad score increase by around 2%. > > BUG=v8:4280 > > Committed: https://crrev.com/b11a8b4d41bf09d6b3d6cf214fe3fb61faf01a64 > Cr-Commit-Position: refs/heads/master@{#39599} TBR=mythria@chromium.org,leszeks@chromium.org,rmcilroy@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:4280 Committed: https://crrev.com/5d693348f062ac3e2efc0111d2b4123e6c2d571d Cr-Commit-Position: refs/heads/master@{#39612}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1627 lines, -1355 lines) Patch
M BUILD.gn View 2 chunks +0 lines, -5 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 2 chunks +27 lines, -29 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 14 chunks +291 lines, -199 lines 0 comments Download
M src/interpreter/bytecode-array-writer.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/interpreter/bytecode-array-writer.cc View 5 chunks +108 lines, -42 lines 0 comments Download
M src/interpreter/bytecode-dead-code-optimizer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-dead-code-optimizer.cc View 1 chunk +3 lines, -3 lines 0 comments Download
D src/interpreter/bytecode-operands.h View 1 chunk +0 lines, -126 lines 0 comments Download
D src/interpreter/bytecode-operands.cc View 1 chunk +0 lines, -89 lines 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-peephole-optimizer.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M src/interpreter/bytecode-pipeline.h View 5 chunks +21 lines, -144 lines 0 comments Download
M src/interpreter/bytecode-pipeline.cc View 2 chunks +56 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-register-optimizer.h View 3 chunks +12 lines, -9 lines 0 comments Download
M src/interpreter/bytecode-register-optimizer.cc View 8 chunks +46 lines, -39 lines 0 comments Download
M src/interpreter/bytecode-traits.h View 2 chunks +198 lines, -78 lines 0 comments Download
M src/interpreter/bytecodes.h View 8 chunks +243 lines, -370 lines 0 comments Download
M src/interpreter/bytecodes.cc View 10 chunks +467 lines, -75 lines 0 comments Download
M src/v8.gyp View 2 chunks +0 lines, -5 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-writer-unittest.cc View 5 chunks +62 lines, -35 lines 0 comments Download
M test/unittests/interpreter/bytecode-dead-code-optimizer-unittest.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc View 13 chunks +28 lines, -30 lines 0 comments Download
M test/unittests/interpreter/bytecode-pipeline-unittest.cc View 3 chunks +24 lines, -16 lines 0 comments Download
M test/unittests/interpreter/bytecode-register-optimizer-unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M test/unittests/interpreter/bytecodes-unittest.cc View 2 chunks +20 lines, -41 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Michael Hablich
Created Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
4 years, 3 months ago (2016-09-22 05:53:03 UTC) #2
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/2360193003/1
4 years, 3 months ago (2016-09-22 05:53:05 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-22 05:53:20 UTC) #4
commit-bot: I haz the power
4 years, 3 months ago (2016-09-22 05:54:11 UTC) #6
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/5d693348f062ac3e2efc0111d2b4123e6c2d571d
Cr-Commit-Position: refs/heads/master@{#39612}

Powered by Google App Engine
This is Rietveld 408576698