v8/src/interpreter
rmcilroy b11a8b4d41 [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

Review-Url: https://codereview.chromium.org/2351763002
Cr-Commit-Position: refs/heads/master@{#39599}
2016-09-21 15:03:03 +00:00
..
bytecode-array-builder.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-array-builder.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-array-iterator.cc [Interpreter] Add an unsigned immediate operand type 2016-09-13 14:49:10 +00:00
bytecode-array-iterator.h [Interpreter] Add an unsigned immediate operand type 2016-09-13 14:49:10 +00:00
bytecode-array-writer.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-array-writer.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-dead-code-optimizer.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-dead-code-optimizer.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-decoder.cc [Interpreter] Add an unsigned immediate operand type 2016-09-13 14:49:10 +00:00
bytecode-decoder.h Reland "[interpreter] Reduce dependencies in bytecodes.{h,cc}" 2016-07-15 12:04:22 +00:00
bytecode-flags.cc [interpreter] Inline FastCloneShallowArrayStub into bytecode handler 2016-09-20 18:04:50 +00:00
bytecode-flags.h [interpreter] Inline FastCloneShallowArrayStub into bytecode handler 2016-09-20 18:04:50 +00:00
bytecode-generator.cc [interpreter] Inline FastCloneShallowArrayStub into bytecode handler 2016-09-20 18:04:50 +00:00
bytecode-generator.h [interpreter] Use clearer names for context related functions. 2016-09-12 11:25:39 +00:00
bytecode-label.cc [interpreter] Use VisitForTest for loop conditions 2016-08-19 09:22:44 +00:00
bytecode-label.h Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
bytecode-operands.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-operands.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-peephole-optimizer.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-peephole-optimizer.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-peephole-table.h [Interpreter] Remove LdaConstant+ToName peephole optimization. 2016-08-11 15:11:54 +00:00
bytecode-pipeline.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-pipeline.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-register-allocator.cc [interpreter] Bytecode register optimizer. 2016-05-27 15:59:16 +00:00
bytecode-register-allocator.h Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
bytecode-register-optimizer.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-register-optimizer.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecode-register.cc Reland "[interpreter] Reduce dependencies in bytecodes.{h,cc}" 2016-07-15 12:04:22 +00:00
bytecode-register.h Reland "[interpreter] Reduce dependencies in bytecodes.{h,cc}" 2016-07-15 12:04:22 +00:00
bytecode-traits.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecodes.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
bytecodes.h [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-21 15:03:03 +00:00
constant-array-builder.cc [Interpreter] Avoid accessing Isolate from during bytecode generation. 2016-08-18 13:42:22 +00:00
constant-array-builder.h Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
control-flow-builders.cc [interpreter] Merge {OsrPoll} with {Jump} bytecode. 2016-09-13 13:07:36 +00:00
control-flow-builders.h Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
handler-table-builder.cc [Interpreter] Avoid accessing Isolate from during bytecode generation. 2016-08-18 13:42:22 +00:00
handler-table-builder.h Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
interpreter-assembler.cc Moved zones and zone related stuff in its own directory. 2016-09-20 16:08:07 +00:00
interpreter-assembler.h [interpreter] Add a fast path for dynamic local load 2016-09-16 13:27:19 +00:00
interpreter-intrinsics.cc [intrinsics] Remove obsolete intrinsics. 2016-07-12 06:41:23 +00:00
interpreter-intrinsics.h Replace SmartPointer<T> with unique_ptr<T> 2016-07-25 11:14:34 +00:00
interpreter.cc [interpreter] Inline FastCloneShallowArrayStub into bytecode handler 2016-09-20 18:04:50 +00:00
interpreter.h [d8] Fix the shared-library build 2016-09-20 12:06:54 +00:00
mkpeephole.cc [Interpreter] Remove LdaConstant+ToName peephole optimization. 2016-08-11 15:11:54 +00:00
OWNERS [interpreter] Remove oth from OWNERS file. 2016-08-31 10:14:18 +00:00