Lines Matching refs:R

100   InstructionTester R;  in TEST()  local
103 R.Int32Constant(i); // Add some nodes to the graph. in TEST()
106 BasicBlock* last = R.schedule.start(); in TEST()
108 BasicBlock* block = R.schedule.NewBasicBlock(); in TEST()
109 R.schedule.AddGoto(last, block); in TEST()
113 R.allocCode(); in TEST()
115 CHECK_EQ(R.graph.NodeCount(), R.code->ValueCount()); in TEST()
117 BasicBlockVector* blocks = R.schedule.rpo_order(); in TEST()
118 CHECK_EQ(static_cast<int>(blocks->size()), R.code->BasicBlockCount()); in TEST()
124 CHECK_EQ(block, R.code->BlockAt(index)); in TEST()
125 CHECK_EQ(-1, R.code->GetLoopEnd(block)); in TEST()
131 InstructionTester R; in TEST() local
133 BasicBlock* b0 = R.schedule.start(); in TEST()
134 BasicBlock* b1 = R.schedule.NewBasicBlock(); in TEST()
135 BasicBlock* b2 = R.schedule.NewBasicBlock(); in TEST()
136 BasicBlock* b3 = R.schedule.end(); in TEST()
138 R.schedule.AddGoto(b0, b1); in TEST()
139 R.schedule.AddGoto(b1, b2); in TEST()
140 R.schedule.AddGoto(b2, b3); in TEST()
142 R.allocCode(); in TEST()
144 R.code->StartBlock(b0); in TEST()
145 int i0 = R.NewInstr(b0); in TEST()
146 int i1 = R.NewInstr(b0); in TEST()
147 R.code->EndBlock(b0); in TEST()
148 R.code->StartBlock(b1); in TEST()
149 int i2 = R.NewInstr(b1); in TEST()
150 int i3 = R.NewInstr(b1); in TEST()
151 int i4 = R.NewInstr(b1); in TEST()
152 int i5 = R.NewInstr(b1); in TEST()
153 R.code->EndBlock(b1); in TEST()
154 R.code->StartBlock(b2); in TEST()
155 int i6 = R.NewInstr(b2); in TEST()
156 int i7 = R.NewInstr(b2); in TEST()
157 int i8 = R.NewInstr(b2); in TEST()
158 R.code->EndBlock(b2); in TEST()
159 R.code->StartBlock(b3); in TEST()
160 R.code->EndBlock(b3); in TEST()
162 CHECK_EQ(b0, R.code->GetBasicBlock(i0)); in TEST()
163 CHECK_EQ(b0, R.code->GetBasicBlock(i1)); in TEST()
165 CHECK_EQ(b1, R.code->GetBasicBlock(i2)); in TEST()
166 CHECK_EQ(b1, R.code->GetBasicBlock(i3)); in TEST()
167 CHECK_EQ(b1, R.code->GetBasicBlock(i4)); in TEST()
168 CHECK_EQ(b1, R.code->GetBasicBlock(i5)); in TEST()
170 CHECK_EQ(b2, R.code->GetBasicBlock(i6)); in TEST()
171 CHECK_EQ(b2, R.code->GetBasicBlock(i7)); in TEST()
172 CHECK_EQ(b2, R.code->GetBasicBlock(i8)); in TEST()
174 CHECK_EQ(b0, R.code->GetBasicBlock(b0->first_instruction_index())); in TEST()
175 CHECK_EQ(b0, R.code->GetBasicBlock(b0->last_instruction_index())); in TEST()
177 CHECK_EQ(b1, R.code->GetBasicBlock(b1->first_instruction_index())); in TEST()
178 CHECK_EQ(b1, R.code->GetBasicBlock(b1->last_instruction_index())); in TEST()
180 CHECK_EQ(b2, R.code->GetBasicBlock(b2->first_instruction_index())); in TEST()
181 CHECK_EQ(b2, R.code->GetBasicBlock(b2->last_instruction_index())); in TEST()
183 CHECK_EQ(b3, R.code->GetBasicBlock(b3->first_instruction_index())); in TEST()
184 CHECK_EQ(b3, R.code->GetBasicBlock(b3->last_instruction_index())); in TEST()
189 InstructionTester R; in TEST() local
191 BasicBlock* b0 = R.schedule.start(); in TEST()
192 R.schedule.AddReturn(b0, R.Int32Constant(1)); in TEST()
194 R.allocCode(); in TEST()
195 TestInstr* i0 = TestInstr::New(R.zone(), 100); in TEST()
196 TestInstr* g = TestInstr::New(R.zone(), 103)->MarkAsControl(); in TEST()
197 R.code->StartBlock(b0); in TEST()
198 R.code->AddInstruction(i0, b0); in TEST()
199 R.code->AddInstruction(g, b0); in TEST()
200 R.code->EndBlock(b0); in TEST()
202 CHECK_EQ(true, R.code->InstructionAt(0)->IsBlockStart()); in TEST()
204 CHECK_EQ(true, R.code->IsGapAt(0)); // Label in TEST()
205 CHECK_EQ(true, R.code->IsGapAt(1)); // Gap in TEST()
206 CHECK_EQ(false, R.code->IsGapAt(2)); // i0 in TEST()
207 CHECK_EQ(true, R.code->IsGapAt(3)); // Gap in TEST()
208 CHECK_EQ(true, R.code->IsGapAt(4)); // Gap in TEST()
209 CHECK_EQ(false, R.code->IsGapAt(5)); // g in TEST()
214 InstructionTester R; in TEST() local
216 BasicBlock* b0 = R.schedule.start(); in TEST()
217 BasicBlock* b1 = R.schedule.end(); in TEST()
218 R.schedule.AddGoto(b0, b1); in TEST()
219 R.schedule.AddReturn(b1, R.Int32Constant(1)); in TEST()
221 R.allocCode(); in TEST()
222 TestInstr* i0 = TestInstr::New(R.zone(), 100); in TEST()
223 TestInstr* g = TestInstr::New(R.zone(), 103)->MarkAsControl(); in TEST()
224 R.code->StartBlock(b0); in TEST()
225 R.code->AddInstruction(i0, b0); in TEST()
226 R.code->AddInstruction(g, b0); in TEST()
227 R.code->EndBlock(b0); in TEST()
229 TestInstr* i1 = TestInstr::New(R.zone(), 102); in TEST()
230 TestInstr* g1 = TestInstr::New(R.zone(), 104)->MarkAsControl(); in TEST()
231 R.code->StartBlock(b1); in TEST()
232 R.code->AddInstruction(i1, b1); in TEST()
233 R.code->AddInstruction(g1, b1); in TEST()
234 R.code->EndBlock(b1); in TEST()
236 CHECK_EQ(true, R.code->InstructionAt(0)->IsBlockStart()); in TEST()
238 CHECK_EQ(true, R.code->IsGapAt(0)); // Label in TEST()
239 CHECK_EQ(true, R.code->IsGapAt(1)); // Gap in TEST()
240 CHECK_EQ(false, R.code->IsGapAt(2)); // i0 in TEST()
241 CHECK_EQ(true, R.code->IsGapAt(3)); // Gap in TEST()
242 CHECK_EQ(true, R.code->IsGapAt(4)); // Gap in TEST()
243 CHECK_EQ(false, R.code->IsGapAt(5)); // g in TEST()
245 CHECK_EQ(true, R.code->InstructionAt(6)->IsBlockStart()); in TEST()
247 CHECK_EQ(true, R.code->IsGapAt(6)); // Label in TEST()
248 CHECK_EQ(true, R.code->IsGapAt(7)); // Gap in TEST()
249 CHECK_EQ(false, R.code->IsGapAt(8)); // i1 in TEST()
250 CHECK_EQ(true, R.code->IsGapAt(9)); // Gap in TEST()
251 CHECK_EQ(true, R.code->IsGapAt(10)); // Gap in TEST()
252 CHECK_EQ(false, R.code->IsGapAt(11)); // g1 in TEST()
257 InstructionTester R; in TEST() local
259 BasicBlock* b0 = R.schedule.start(); in TEST()
260 R.schedule.AddReturn(b0, R.Int32Constant(1)); in TEST()
262 R.allocCode(); in TEST()
263 TestInstr* i0 = TestInstr::New(R.zone(), 100); in TEST()
264 TestInstr* g = TestInstr::New(R.zone(), 103)->MarkAsControl(); in TEST()
265 R.code->StartBlock(b0); in TEST()
266 R.code->AddInstruction(i0, b0); in TEST()
267 R.code->AddInstruction(g, b0); in TEST()
268 R.code->EndBlock(b0); in TEST()
270 CHECK_EQ(true, R.code->InstructionAt(0)->IsBlockStart()); in TEST()
272 CHECK_EQ(true, R.code->IsGapAt(0)); // Label in TEST()
273 CHECK_EQ(true, R.code->IsGapAt(1)); // Gap in TEST()
274 CHECK_EQ(false, R.code->IsGapAt(2)); // i0 in TEST()
275 CHECK_EQ(true, R.code->IsGapAt(3)); // Gap in TEST()
276 CHECK_EQ(true, R.code->IsGapAt(4)); // Gap in TEST()
277 CHECK_EQ(false, R.code->IsGapAt(5)); // g in TEST()
283 UnallocatedOperand* op1 = R.NewUnallocated(index + 6); in TEST()
284 UnallocatedOperand* op2 = R.NewUnallocated(index + 12); in TEST()
286 R.code->AddGapMove(index, op1, op2); in TEST()
287 GapInstruction* gap = R.code->GapAt(index); in TEST()