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

Side by Side Diff: test/cctest/compiler/test-jump-threading.cc

Issue 854703002: Reland "[turbofan] simplify gap ordering" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-codes.h" 9 #include "src/compiler/instruction-codes.h"
10 #include "src/compiler/jump-threading.h" 10 #include "src/compiler/jump-threading.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 End(); 53 End();
54 return pos; 54 return pos;
55 } 55 }
56 void Nop() { 56 void Nop() {
57 Start(); 57 Start();
58 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); 58 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop));
59 } 59 }
60 void RedundantMoves() { 60 void RedundantMoves() {
61 Start(); 61 Start();
62 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); 62 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop));
63 int index = static_cast<int>(sequence_.instructions().size()) - 1; 63 int index = static_cast<int>(sequence_.instructions().size()) - 2;
64 sequence_.AddGapMove(index, RegisterOperand::Create(13, main_zone()), 64 sequence_.AddGapMove(index, RegisterOperand::Create(13, main_zone()),
65 RegisterOperand::Create(13, main_zone())); 65 RegisterOperand::Create(13, main_zone()));
66 } 66 }
67 void NonRedundantMoves() { 67 void NonRedundantMoves() {
68 Start(); 68 Start();
69 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); 69 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop));
70 int index = static_cast<int>(sequence_.instructions().size()) - 1; 70 int index = static_cast<int>(sequence_.instructions().size()) - 2;
71 sequence_.AddGapMove(index, ImmediateOperand::Create(11, main_zone()), 71 sequence_.AddGapMove(index, ImmediateOperand::Create(11, main_zone()),
72 RegisterOperand::Create(11, main_zone())); 72 RegisterOperand::Create(11, main_zone()));
73 } 73 }
74 void Other() { 74 void Other() {
75 Start(); 75 Start();
76 sequence_.AddInstruction(Instruction::New(main_zone(), 155)); 76 sequence_.AddInstruction(Instruction::New(main_zone(), 155));
77 } 77 }
78 void End() { 78 void End() {
79 Start(); 79 Start();
80 sequence_.EndBlock(current_->rpo_number()); 80 sequence_.EndBlock(current_->rpo_number());
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 for (int k = 4; k < 5; k++) assembly[k]--; 755 for (int k = 4; k < 5; k++) assembly[k]--;
756 } 756 }
757 CheckAssemblyOrder(code, 5, assembly); 757 CheckAssemblyOrder(code, 5, assembly);
758 } 758 }
759 } 759 }
760 } 760 }
761 761
762 } // namespace compiler 762 } // namespace compiler
763 } // namespace internal 763 } // namespace internal
764 } // namespace v8 764 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698