• hablich's avatar
    Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.... · 5d693348
    hablich authored
    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
    
    Review-Url: https://codereview.chromium.org/2360193003
    Cr-Commit-Position: refs/heads/master@{#39612}
    5d693348
Name
Last commit
Last update
..
OWNERS Loading commit data...
bytecode-array-builder.cc Loading commit data...
bytecode-array-builder.h Loading commit data...
bytecode-array-iterator.cc Loading commit data...
bytecode-array-iterator.h Loading commit data...
bytecode-array-writer.cc Loading commit data...
bytecode-array-writer.h Loading commit data...
bytecode-dead-code-optimizer.cc Loading commit data...
bytecode-dead-code-optimizer.h Loading commit data...
bytecode-decoder.cc Loading commit data...
bytecode-decoder.h Loading commit data...
bytecode-flags.cc Loading commit data...
bytecode-flags.h Loading commit data...
bytecode-generator.cc Loading commit data...
bytecode-generator.h Loading commit data...
bytecode-label.cc Loading commit data...
bytecode-label.h Loading commit data...
bytecode-peephole-optimizer.cc Loading commit data...
bytecode-peephole-optimizer.h Loading commit data...
bytecode-peephole-table.h Loading commit data...
bytecode-pipeline.cc Loading commit data...
bytecode-pipeline.h Loading commit data...
bytecode-register-allocator.cc Loading commit data...
bytecode-register-allocator.h Loading commit data...
bytecode-register-optimizer.cc Loading commit data...
bytecode-register-optimizer.h Loading commit data...
bytecode-register.cc Loading commit data...
bytecode-register.h Loading commit data...
bytecode-traits.h Loading commit data...
bytecodes.cc Loading commit data...
bytecodes.h Loading commit data...
constant-array-builder.cc Loading commit data...
constant-array-builder.h Loading commit data...
control-flow-builders.cc Loading commit data...
control-flow-builders.h Loading commit data...
handler-table-builder.cc Loading commit data...
handler-table-builder.h Loading commit data...
interpreter-assembler.cc Loading commit data...
interpreter-assembler.h Loading commit data...
interpreter-intrinsics.cc Loading commit data...
interpreter-intrinsics.h Loading commit data...
interpreter.cc Loading commit data...
interpreter.h Loading commit data...
mkpeephole.cc Loading commit data...