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

Unified Diff: src/interpreter/bytecode-peephole-optimizer.cc

Issue 2489513005: [Interpreter] Remove all Ldr style bytecodes and replace with Star lookahead. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-peephole-table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-peephole-optimizer.cc
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc
index 791da3eba3c2d062ccc0a066a0e72c1bcb475e17..40552943f75dcb3b07d196b910f00cfd321d2946 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -116,24 +116,6 @@ bool BytecodePeepholeOptimizer::CanElideLastBasedOnSourcePosition(
namespace {
-void TransformLdaStarToLdrLdar(Bytecode new_bytecode, BytecodeNode* const last,
- BytecodeNode* const current) {
- DCHECK_EQ(current->bytecode(), Bytecode::kStar);
-
- //
- // An example transformation here would be:
- //
- // LdaGlobal i0, i1 ____\ LdrGlobal i0, i1, R
- // Star R ====/ Ldar R
- //
- // which loads a global value into both a register and the
- // accumulator. However, in the second form the Ldar can often be
- // peephole optimized away unlike the Star in the first form.
- //
- last->Transform(new_bytecode, current->operand(0));
- current->set_bytecode(Bytecode::kLdar, current->operand(0));
-}
-
void TransformLdaSmiBinaryOpToBinaryOpWithSmi(Bytecode new_bytecode,
BytecodeNode* const last,
BytecodeNode* const current) {
@@ -239,17 +221,6 @@ void BytecodePeepholeOptimizer::ChangeBytecodeAction(
DefaultAction(node);
}
-void BytecodePeepholeOptimizer::TransformLdaStarToLdrLdarAction(
- BytecodeNode* const node, const PeepholeActionAndData* action_data) {
- DCHECK(LastIsValid());
- DCHECK(!Bytecodes::IsJump(node->bytecode()));
-
- if (!node->source_info().is_statement()) {
- TransformLdaStarToLdrLdar(action_data->bytecode, last(), node);
- }
- DefaultAction(node);
-}
-
void BytecodePeepholeOptimizer::TransformLdaSmiBinaryOpToBinaryOpWithSmiAction(
BytecodeNode* const node, const PeepholeActionAndData* action_data) {
DCHECK(LastIsValid());
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-peephole-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698