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

Unified Diff: test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased the patch. Created 4 years, 4 months 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 | « test/unittests/interpreter/bytecode-dead-code-optimizer-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
index fb854a98af0e158bfb8eaec4f2aae81a6fb6424b..0fc97b9185b883688d9c3e5f2e4513a273e0e4a5 100644
--- a/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
+++ b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
@@ -70,7 +70,7 @@ class BytecodePeepholeOptimizerTest : public BytecodePipelineStage,
TEST_F(BytecodePeepholeOptimizerTest, FlushOnJump) {
CHECK_EQ(write_count(), 0);
- BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand());
+ BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand(), 1);
optimizer()->Write(&add);
CHECK_EQ(write_count(), 0);
@@ -84,7 +84,7 @@ TEST_F(BytecodePeepholeOptimizerTest, FlushOnJump) {
TEST_F(BytecodePeepholeOptimizerTest, FlushOnBind) {
CHECK_EQ(write_count(), 0);
- BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand());
+ BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand(), 1);
optimizer()->Write(&add);
CHECK_EQ(write_count(), 0);
@@ -99,7 +99,7 @@ TEST_F(BytecodePeepholeOptimizerTest, FlushOnBind) {
TEST_F(BytecodePeepholeOptimizerTest, ElideEmptyNop) {
BytecodeNode nop(Bytecode::kNop);
optimizer()->Write(&nop);
- BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand());
+ BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand(), 1);
optimizer()->Write(&add);
Flush();
CHECK_EQ(write_count(), 1);
@@ -110,7 +110,7 @@ TEST_F(BytecodePeepholeOptimizerTest, ElideExpressionNop) {
BytecodeNode nop(Bytecode::kNop);
nop.source_info().MakeExpressionPosition(3);
optimizer()->Write(&nop);
- BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand());
+ BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand(), 1);
optimizer()->Write(&add);
Flush();
CHECK_EQ(write_count(), 1);
@@ -121,7 +121,7 @@ TEST_F(BytecodePeepholeOptimizerTest, KeepStatementNop) {
BytecodeNode nop(Bytecode::kNop);
nop.source_info().MakeStatementPosition(3);
optimizer()->Write(&nop);
- BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand());
+ BytecodeNode add(Bytecode::kAdd, Register(0).ToOperand(), 1);
add.source_info().MakeExpressionPosition(3);
optimizer()->Write(&add);
Flush();
@@ -494,7 +494,7 @@ TEST_F(BytecodePeepholeOptimizerTest, MergeLdaSmiWithBinaryOp) {
BytecodeNode first(Bytecode::kLdaSmi, imm_operand);
first.source_info().Clone({3, true});
uint32_t reg_operand = Register(0).ToOperand();
- BytecodeNode second(operator_replacement[0], reg_operand);
+ BytecodeNode second(operator_replacement[0], reg_operand, 1);
optimizer()->Write(&first);
optimizer()->Write(&second);
Flush();
@@ -522,7 +522,7 @@ TEST_F(BytecodePeepholeOptimizerTest, NotMergingLdaSmiWithBinaryOp) {
BytecodeNode first(Bytecode::kLdaSmi, imm_operand);
first.source_info().Clone({3, true});
uint32_t reg_operand = Register(0).ToOperand();
- BytecodeNode second(operator_replacement[0], reg_operand);
+ BytecodeNode second(operator_replacement[0], reg_operand, 1);
second.source_info().Clone({4, true});
optimizer()->Write(&first);
optimizer()->Write(&second);
@@ -545,7 +545,7 @@ TEST_F(BytecodePeepholeOptimizerTest, MergeLdaZeroWithBinaryOp) {
for (auto operator_replacement : operator_replacement_pairs) {
BytecodeNode first(Bytecode::kLdaZero);
uint32_t reg_operand = Register(0).ToOperand();
- BytecodeNode second(operator_replacement[0], reg_operand);
+ BytecodeNode second(operator_replacement[0], reg_operand, 1);
optimizer()->Write(&first);
optimizer()->Write(&second);
Flush();
« no previous file with comments | « test/unittests/interpreter/bytecode-dead-code-optimizer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698