Chromium Code Reviews

Unified Diff: src/interpreter/mkpeephole.cc

Issue 2238853002: [Interpreter] Remove LdaConstant+ToName peephole optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_internalize
Patch Set: Address comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/interpreter/mkpeephole.cc
diff --git a/src/interpreter/mkpeephole.cc b/src/interpreter/mkpeephole.cc
index 87678e06dff2825e06de5c7f907956ae08fc0d6a..8e9d5fea478fa74335e9d24a9c571a6ef2fe7638 100644
--- a/src/interpreter/mkpeephole.cc
+++ b/src/interpreter/mkpeephole.cc
@@ -108,13 +108,8 @@ PeepholeActionAndData PeepholeActionTableWriter::LookupActionAndData(
// ToName bytecodes can be replaced by Star with the same output register if
// the value in the accumulator is already a name.
- if (current == Bytecode::kToName) {
- if (last == Bytecode::kLdaConstant) {
- return {PeepholeAction::kTransformToStarIfLoadingNameConstantAction,
- Bytecode::kIllegal};
- } else if (Bytecodes::PutsNameInAccumulator(last)) {
- return {PeepholeAction::kChangeBytecodeAction, Bytecode::kStar};
- }
+ if (current == Bytecode::kToName && Bytecodes::PutsNameInAccumulator(last)) {
+ return {PeepholeAction::kChangeBytecodeAction, Bytecode::kStar};
}
// Nop are placeholders for holding source position information and can be
« no previous file with comments | « src/interpreter/bytecode-peephole-table.h ('k') | test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden » ('j') | no next file with comments »

Powered by Google App Engine