|
[Interpreter] Replace BytecodeRegisterAllocator with a simple bump pointer.
There are only a few occasions where we allocate a register in an outer
expression allocation scope, which makes the costly free-list approach
of the BytecodeRegisterAllocator unecessary. This CL replaces all
occurrences with moves to the accumulator and stores to a register
allocated in the correct scope. By doing this, we can simplify the
BytecodeRegisterAllocator to be a simple bump-pointer allocator
with registers released in the same order as allocated.
The following changes are also made:
- Make BytecodeRegisterOptimizer able to use registers which have been
unallocated, but not yet reused
- Remove RegisterExpressionResultScope and rename
AccumulatorExpressionResultScope to ValueExpressionResultScope
- Introduce RegisterList to represent consecutive register
allocations, and use this for operands to call bytecodes.
By avoiding the free-list handling, this gives another couple of
percent on CodeLoad.
BUG= v8:4280
Committed: https://crrev.com/27fe988b85e9b0b77eb5c376d4bdd1350dfc3e17
Cr-Commit-Position: refs/heads/master@{#39905}
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+862 lines, -1478 lines) |
Patch |
|
M |
BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.h
|
View
|
1
2
3
4
|
5 chunks |
+54 lines, -70 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.cc
|
View
|
|
8 chunks |
+39 lines, -41 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.h
|
View
|
|
8 chunks |
+11 lines, -28 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
3
4
5
|
73 chunks |
+300 lines, -624 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-register-allocator.h
|
View
|
1
2
3
4
|
2 chunks |
+80 lines, -80 lines |
0 comments
|
Download
|
|
D |
src/interpreter/bytecode-register-allocator.cc
|
View
|
|
1 chunk |
+0 lines, -210 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-register-optimizer.h
|
View
|
|
2 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-register-optimizer.cc
|
View
|
1
2
3
|
13 chunks |
+72 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/interpreter/mkpeephole.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/v8.gyp
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
|
View
|
|
12 chunks |
+28 lines, -28 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Eval.golden
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ForIn.golden
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Generators.golden
|
View
|
1
2
3
4
5
|
8 chunks |
+29 lines, -30 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/LetVariable.golden
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
|
View
|
|
5 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
|
View
|
|
12 chunks |
+11 lines, -14 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/WithStatement.golden
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-interpreter.cc
|
View
|
|
6 chunks |
+37 lines, -30 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-interpreter-intrinsics.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-array-builder-unittest.cc
|
View
|
|
7 chunks |
+13 lines, -46 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-array-iterator-unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-register-allocator-unittest.cc
|
View
|
|
1 chunk |
+69 lines, -185 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
|
View
|
1
2
|
5 chunks |
+65 lines, -12 lines |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 50 (42 generated)
|