Lines Matching refs:graph_

38   BoundsCheckEliminationTest()  : graph_(CreateGraph()) {  in BoundsCheckEliminationTest()
39 graph_->SetHasBoundsChecks(true); in BoundsCheckEliminationTest()
45 graph_->BuildDominatorTree(); in RunBCE()
47 InstructionSimplifier(graph_, /* codegen= */ nullptr).Run(); in RunBCE()
49 SideEffectsAnalysis side_effects(graph_); in RunBCE()
52 GVNOptimization(graph_, side_effects).Run(); in RunBCE()
54 HInductionVarAnalysis induction(graph_); in RunBCE()
57 BoundsCheckElimination(graph_, side_effects, &induction).Run(); in RunBCE()
60 HGraph* graph_; member in art::BoundsCheckEliminationTest
68 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
69 graph_->AddBlock(entry); in TEST_F()
70 graph_->SetEntryBlock(entry); in TEST_F()
72 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); // array in TEST_F()
74 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); // i in TEST_F()
78 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
79 HInstruction* constant_0 = graph_->GetIntConstant(0); in TEST_F()
81 HBasicBlock* block1 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
82 graph_->AddBlock(block1); in TEST_F()
89 HBasicBlock* block2 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
90 graph_->AddBlock(block2); in TEST_F()
102 HBasicBlock* block3 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
103 graph_->AddBlock(block3); in TEST_F()
113 HBasicBlock* block4 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
114 graph_->AddBlock(block4); in TEST_F()
126 HBasicBlock* block5 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
127 graph_->AddBlock(block5); in TEST_F()
139 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
140 graph_->AddBlock(exit); in TEST_F()
165 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
166 graph_->AddBlock(entry); in TEST_F()
167 graph_->SetEntryBlock(entry); in TEST_F()
169 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); // array in TEST_F()
171 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); // i in TEST_F()
175 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
176 HInstruction* constant_0 = graph_->GetIntConstant(0); in TEST_F()
177 HInstruction* constant_max_int = graph_->GetIntConstant(INT_MAX); in TEST_F()
179 HBasicBlock* block1 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
180 graph_->AddBlock(block1); in TEST_F()
187 HBasicBlock* block2 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
188 graph_->AddBlock(block2); in TEST_F()
201 HBasicBlock* block3 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
202 graph_->AddBlock(block3); in TEST_F()
210 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
211 graph_->AddBlock(exit); in TEST_F()
230 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
231 graph_->AddBlock(entry); in TEST_F()
232 graph_->SetEntryBlock(entry); in TEST_F()
234 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); // array in TEST_F()
236 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); // i in TEST_F()
240 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
241 HInstruction* constant_0 = graph_->GetIntConstant(0); in TEST_F()
242 HInstruction* constant_max_int = graph_->GetIntConstant(INT_MAX); in TEST_F()
244 HBasicBlock* block1 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
245 graph_->AddBlock(block1); in TEST_F()
256 HBasicBlock* block2 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
257 graph_->AddBlock(block2); in TEST_F()
268 HBasicBlock* block3 = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
269 graph_->AddBlock(block3); in TEST_F()
277 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
278 graph_->AddBlock(exit); in TEST_F()
295 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
296 graph_->AddBlock(entry); in TEST_F()
297 graph_->SetEntryBlock(entry); in TEST_F()
299 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F()
302 HInstruction* constant_5 = graph_->GetIntConstant(5); in TEST_F()
303 HInstruction* constant_4 = graph_->GetIntConstant(4); in TEST_F()
304 HInstruction* constant_6 = graph_->GetIntConstant(6); in TEST_F()
305 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
307 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
308 graph_->AddBlock(block); in TEST_F()
346 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
347 graph_->AddBlock(exit); in TEST_F()
432 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), 0, 1); in TEST_F()
439 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), 1, 1); in TEST_F()
446 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), -1, 1); in TEST_F()
453 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), 0, 1, kCondGT); in TEST_F()
461 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), 0, 2); in TEST_F()
468 HInstruction* bounds_check = BuildSSAGraph1(graph_, GetAllocator(), 1, 2); in TEST_F()
549 HInstruction* bounds_check = BuildSSAGraph2(graph_, GetAllocator(), 0); in TEST_F()
556 HInstruction* bounds_check = BuildSSAGraph2(graph_, GetAllocator(), 1); in TEST_F()
563 HInstruction* bounds_check = BuildSSAGraph2(graph_, GetAllocator(), -1); in TEST_F()
570 HInstruction* bounds_check = BuildSSAGraph2(graph_, GetAllocator(), 0, -1, kCondLT); in TEST_F()
577 HInstruction* bounds_check = BuildSSAGraph2(graph_, GetAllocator(), 0, -2); in TEST_F()
657 HInstruction* bounds_check = BuildSSAGraph3(graph_, GetAllocator(), 0, 1, kCondGE); in TEST_F()
665 HInstruction* bounds_check = BuildSSAGraph3(graph_, GetAllocator(), 1, 1, kCondGE); in TEST_F()
673 HInstruction* bounds_check = BuildSSAGraph3(graph_, GetAllocator(), 0, 1, kCondGT); in TEST_F()
681 HInstruction* bounds_check = BuildSSAGraph3(graph_, GetAllocator(), 1, 8, kCondGE); in TEST_F()
763 HInstruction* bounds_check = BuildSSAGraph4(graph_, GetAllocator(), 0); in TEST_F()
770 HInstruction* bounds_check = BuildSSAGraph4(graph_, GetAllocator(), 1); in TEST_F()
777 HInstruction* bounds_check = BuildSSAGraph4(graph_, GetAllocator(), 0, kCondGT); in TEST_F()
794 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
795 graph_->AddBlock(entry); in TEST_F()
796 graph_->SetEntryBlock(entry); in TEST_F()
798 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F()
801 HInstruction* constant_0 = graph_->GetIntConstant(0); in TEST_F()
802 HInstruction* constant_minus_1 = graph_->GetIntConstant(-1); in TEST_F()
803 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
805 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
806 graph_->AddBlock(block); in TEST_F()
810 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
811 graph_->AddBlock(exit); in TEST_F()
814 HBasicBlock* outer_header = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
815 graph_->AddBlock(outer_header); in TEST_F()
830 HBasicBlock* inner_header = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
831 graph_->AddBlock(inner_header); in TEST_F()
848 HBasicBlock* inner_body_compare = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
849 graph_->AddBlock(inner_body_compare); in TEST_F()
875 HBasicBlock* inner_body_swap = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
876 graph_->AddBlock(inner_body_swap); in TEST_F()
920 HBasicBlock* inner_body_add = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
921 graph_->AddBlock(inner_body_add); in TEST_F()
927 HBasicBlock* outer_body_add = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
928 graph_->AddBlock(outer_body_add); in TEST_F()
965 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
966 graph_->AddBlock(entry); in TEST_F()
967 graph_->SetEntryBlock(entry); in TEST_F()
969 HParameterValue(graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); in TEST_F()
972 HInstruction* constant_0 = graph_->GetIntConstant(0); in TEST_F()
973 HInstruction* constant_1 = graph_->GetIntConstant(1); in TEST_F()
974 HInstruction* constant_10 = graph_->GetIntConstant(10); in TEST_F()
975 HInstruction* constant_200 = graph_->GetIntConstant(200); in TEST_F()
976 HInstruction* constant_minus_10 = graph_->GetIntConstant(-10); in TEST_F()
978 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
979 graph_->AddBlock(block); in TEST_F()
990 HBasicBlock* loop_header = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
991 HBasicBlock* loop_body = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
992 HBasicBlock* exit = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
994 graph_->AddBlock(loop_header); in TEST_F()
995 graph_->AddBlock(loop_body); in TEST_F()
996 graph_->AddBlock(exit); in TEST_F()