Home
last modified time | relevance | path

Searched refs:graph_ (Results 1 – 25 of 71) sorted by relevance

123

/art/compiler/optimizing/
Dlicm_test.cc43 graph_ = CreateGraph(); in LICMTest()
51 entry_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
52 loop_preheader_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
53 loop_header_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
54 loop_body_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
55 return_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
56 exit_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop()
58 graph_->AddBlock(entry_); in BuildLoop()
59 graph_->AddBlock(loop_preheader_); in BuildLoop()
60 graph_->AddBlock(loop_header_); in BuildLoop()
[all …]
Dbuilder.cc44 : graph_(graph), in HGraphBuilder()
57 : graph_(graph), in HGraphBuilder()
92 DCHECK(graph_->GetBlocks().empty()); in BuildGraph()
94 graph_->SetNumberOfVRegs(code_item_accessor_.RegistersSize()); in BuildGraph()
95 graph_->SetNumberOfInVRegs(code_item_accessor_.InsSize()); in BuildGraph()
96 graph_->SetMaximumNumberOfOutVRegs(code_item_accessor_.OutsSize()); in BuildGraph()
99 ScopedArenaAllocator local_allocator(graph_->GetArenaStack()); in BuildGraph()
100 HBasicBlockBuilder block_builder(graph_, dex_file_, code_item_accessor_, &local_allocator); in BuildGraph()
101 SsaBuilder ssa_builder(graph_, in BuildGraph()
105 HInstructionBuilder instruction_builder(graph_, in BuildGraph()
[all …]
Dloop_optimization_test.cc35 graph_ = CreateGraph(); in SetUp()
37 iva_ = new (GetAllocator()) HInductionVarAnalysis(graph_); in SetUp()
40 codegen_ = CodeGenerator::Create(graph_, *compiler_options_); in SetUp()
43 graph_, *codegen_.get(), iva_, /* stats= */ nullptr); in SetUp()
49 graph_ = nullptr; in TearDown()
58 graph_->SetNumberOfVRegs(1); in BuildGraph()
59 entry_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph()
60 return_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph()
61 exit_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph()
62 graph_->AddBlock(entry_block_); in BuildGraph()
[all …]
Dnodes_test.cc40 AdjacencyListGraph alg(graph_, in TEST_F()
57 graph_->ClearDominanceInformation(); in TEST_F()
58 graph_->BuildDominatorTree(); in TEST_F()
62 std::all_of(graph_->GetBlocks().begin(), graph_->GetBlocks().end(), [&](HBasicBlock* b) { in TEST_F()
63 return b == graph_->GetEntryBlock() || b == nullptr || b->GetDominator() != nullptr; in TEST_F()
66 std::any_of(graph_->GetBlocks().begin(), graph_->GetBlocks().end(), [&](HBasicBlock* b) { in TEST_F()
71 graph_->ClearLoopInformation(); in TEST_F()
72 graph_->ClearDominanceInformation(); in TEST_F()
76 std::none_of(graph_->GetBlocks().begin(), graph_->GetBlocks().end(), [&](HBasicBlock* b) { in TEST_F()
80 std::all_of(graph_->GetBlocks().begin(), graph_->GetBlocks().end(), [&](HBasicBlock* b) { in TEST_F()
[all …]
Dbounds_check_elimination_test.cc38 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()
[all …]
Dssa_liveness_analysis_test.cc35 graph_ = CreateGraph(); in SetUp()
37 codegen_ = CodeGenerator::Create(graph_, *compiler_options_); in SetUp()
40 entry_ = new (GetAllocator()) HBasicBlock(graph_); in SetUp()
41 graph_->AddBlock(entry_); in SetUp()
42 graph_->SetEntryBlock(entry_); in SetUp()
54 HGraph* graph_; member in art::SsaLivenessAnalysisTest
62 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); in TEST_F()
70 graph_->BuildDominatorTree(); in TEST_F()
71 SsaLivenessAnalysis ssa_analysis(graph_, codegen_.get(), GetScopedAllocator()); in TEST_F()
82 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F()
[all …]
Dload_store_analysis_test.cc50 return AdjacencyListGraph(graph_, GetAllocator(), entry_name, exit_name, adj); in SetupFromAdjacencyList()
56 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F()
57 graph_->AddBlock(entry); in TEST_F()
58 graph_->SetEntryBlock(entry); in TEST_F()
71 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F()
73 graph_->GetDexFile(), dex::TypeIndex(1), 1, DataType::Type::kInt32); in TEST_F()
74 HInstruction* c1 = graph_->GetIntConstant(1); in TEST_F()
75 HInstruction* c2 = graph_->GetIntConstant(2); in TEST_F()
76 HInstruction* c3 = graph_->GetIntConstant(3); in TEST_F()
92 ScopedArenaAllocator allocator(graph_->GetArenaStack()); in TEST_F()
[all …]
Dblock_builder.cc31 graph_(graph), in HBasicBlockBuilder()
51 block = new (allocator_) HBasicBlock(graph_, semantic_dex_pc); in MaybeCreateBlockAt()
141 HBasicBlock* block = graph_->GetEntryBlock(); in ConnectBasicBlocks()
142 graph_->AddBlock(block); in ConnectBasicBlocks()
161 graph_->AddBlock(block); in ConnectBasicBlocks()
179 block->AddSuccessor(graph_->GetExitBlock()); in ConnectBasicBlocks()
191 graph_->AddBlock(block); in ConnectBasicBlocks()
208 graph_->AddBlock(graph_->GetExitBlock()); in ConnectBasicBlocks()
237 DCHECK(!graph_->GetEntryBlock()->GetSuccessors().empty()) in MightHaveLiveNormalPredecessors()
274 for (HBasicBlock* block : graph_->GetBlocks()) { in InsertTryBoundaryBlocks()
[all …]
Ddead_code_elimination.cc252 HBasicBlock* exit = graph_->GetExitBlock(); in SimplifyAlwaysThrows()
253 if (!graph_->HasAlwaysThrowingInvokes() || exit == nullptr) { in SimplifyAlwaysThrows()
260 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in SimplifyAlwaysThrows()
315 graph_->RecomputeDominatorTree(); in SimplifyAlwaysThrows()
328 for (HBasicBlock* block : graph_->GetPostOrder()) { in SimplifyIfs()
439 graph_->RecomputeDominatorTree(); in SimplifyIfs()
441 graph_->ClearDominanceInformation(); in SimplifyIfs()
443 graph_->SimplifyCFG(); in SimplifyIfs()
444 graph_->ComputeDominanceInformation(); in SimplifyIfs()
445 graph_->ComputeTryBlockInformation(); in SimplifyIfs()
[all …]
Dselect_generator_test.cc32 AddParameter(new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in InitGraphAndParameters()
50 HParameterValue* bool_param = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in ConstructBasicGraphForSelect()
55 HIntConstant* const1 = graph_->GetIntConstant(1); in ConstructBasicGraphForSelect()
71 graph_->BuildDominatorTree(); in CheckGraphAndTrySelectGenerator()
74 SideEffectsAnalysis side_effects(graph_); in CheckGraphAndTrySelectGenerator()
76 return HSelectGenerator(graph_, /*handles*/ nullptr, /*stats*/ nullptr).Run(); in CheckGraphAndTrySelectGenerator()
86 ArenaVector<HInstruction*> current_locals({parameters_[0], graph_->GetIntConstant(1)}, in TEST_F()
Dload_store_elimination_test.cc72 graph_->BuildDominatorTree(); in PerformLSE()
73 LoadStoreElimination lse(graph_, /*stats=*/nullptr); in PerformLSE()
82 graph_->ClearDominanceInformation(); in PerformLSE()
94 HInstruction* c1 = graph_->GetIntConstant(1); in CreateEntryBlockInstructions()
95 HInstruction* c4 = graph_->GetIntConstant(4); in CreateEntryBlockInstructions()
123 HInstruction* c0 = graph_->GetIntConstant(0); in CreateTestControlFlowGraph()
124 HInstruction* c1 = graph_->GetIntConstant(1); in CreateTestControlFlowGraph()
125 HInstruction* c128 = graph_->GetIntConstant(128); in CreateTestControlFlowGraph()
222 HInstruction* c1 = graph_->GetIntConstant(1); in AddVecStore()
264 data = graph_->GetIntConstant(1); in AddArraySet()
[all …]
Dscheduler_test.cc71 SchedulerTest() : graph_(CreateGraph()) { } in SchedulerTest()
75 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TestBuildDependencyGraphAndSchedule()
76 HBasicBlock* block1 = new (GetAllocator()) HBasicBlock(graph_); in TestBuildDependencyGraphAndSchedule()
77 graph_->AddBlock(entry); in TestBuildDependencyGraphAndSchedule()
78 graph_->AddBlock(block1); in TestBuildDependencyGraphAndSchedule()
79 graph_->SetEntryBlock(entry); in TestBuildDependencyGraphAndSchedule()
96 HInstruction* array = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in TestBuildDependencyGraphAndSchedule()
100 HInstruction* c1 = graph_->GetIntConstant(1); in TestBuildDependencyGraphAndSchedule()
101 HInstruction* c2 = graph_->GetIntConstant(10); in TestBuildDependencyGraphAndSchedule()
135 graph_->GetArtMethod(), in TestBuildDependencyGraphAndSchedule()
[all …]
Dcode_sinking.cc35 if (graph_->GetExitBlock() == nullptr) { in Run()
46 HBasicBlock* exit = graph_->GetExitBlock(); in UncommonBranchSinking()
332 ScopedArenaAllocator allocator(graph_->GetArenaStack()); in SinkCodeToUncommonBranch()
334 size_t number_of_instructions = graph_->GetCurrentInstructionId(); in SinkCodeToUncommonBranch()
338 ArenaBitVector post_dominated(&allocator, graph_->GetBlocks().size(), /* expandable= */ false); in SinkCodeToUncommonBranch()
346 for (HBasicBlock* block : graph_->GetPostOrder()) { in SinkCodeToUncommonBranch()
352 DCHECK_NE(block, graph_->GetExitBlock()) in SinkCodeToUncommonBranch()
402 for (size_t i = 0, e = graph_->GetBlocks().size(); i < e; ++i) { in SinkCodeToUncommonBranch()
404 finder.Update(graph_->GetBlocks()[i]); in SinkCodeToUncommonBranch()
405 AddInputs(graph_->GetBlocks()[i], processed_instructions, post_dominated, &worklist); in SinkCodeToUncommonBranch()
[all …]
Dconstant_folding_test.cc37 ConstantFoldingTest() : graph_(nullptr) { } in ConstantFoldingTest()
45 graph_ = CreateCFG(data, return_type); in TestCode()
56 ASSERT_NE(graph_, nullptr); in TestCodeOnReadyGraph()
58 StringPrettyPrinter printer_before(graph_); in TestCodeOnReadyGraph()
63 HConstantFolding(graph_, /* stats= */ nullptr, "constant_folding").Run(); in TestCodeOnReadyGraph()
64 GraphChecker graph_checker_cf(graph_); in TestCodeOnReadyGraph()
68 StringPrettyPrinter printer_after_cf(graph_); in TestCodeOnReadyGraph()
73 check_after_cf(graph_); in TestCodeOnReadyGraph()
75 HDeadCodeElimination(graph_, /* stats= */ nullptr, "dead_code_elimination").Run(); in TestCodeOnReadyGraph()
76 GraphChecker graph_checker_dce(graph_); in TestCodeOnReadyGraph()
[all …]
Dinliner.cc141 } else if (graph_->IsDebuggable()) { in Run()
151 if (outermost_graph_ == graph_) { in Run()
152 total_number_of_instructions_ = CountNumberOfInstructions(graph_); in Run()
170 !graph_->IsCompilingBaseline(); in Run()
173 ArenaVector<HBasicBlock*> blocks = graph_->GetReversePostOrder(); in Run()
210 ReferenceTypePropagation rtp_fixup(graph_, in Run()
228 return did_inline || graph_->HasAlwaysThrowingInvokes(); in Run()
493 ReferenceTypePropagation rtp_fixup(graph_, in TryInline()
517 if (outermost_graph_ == graph_) { in TryInline()
532 graph_->SetHasAlwaysThrowingInvokes(/* value= */ true); in TryInline()
[all …]
Dsuperblock_cloner_test.cc38 AddParameter(new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in InitGraphAndParameters()
68 HIntConstant* const_0 = graph_->GetIntConstant(0); in CreateBasicLoopDataFlow()
69 HIntConstant* const_1 = graph_->GetIntConstant(1); in CreateBasicLoopDataFlow()
70 HIntConstant* const_128 = graph_->GetIntConstant(128); in CreateBasicLoopDataFlow()
105 graph_->SetHasBoundsChecks(true); in CreateBasicLoopDataFlow()
124 graph_->BuildDominatorTree(); in TEST_F()
128 CloneAndReplaceInstructionVisitor visitor(graph_); in TEST_F()
156 graph_->BuildDominatorTree(); in TEST_F()
160 arena, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in TEST_F()
167 SuperblockCloner cloner(graph_, in TEST_F()
[all …]
Dssa_builder.cc34 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in FixNullConstantType()
60 equality_instr->ReplaceInput(graph_->GetNullConstant(), int_operand == right ? 1 : 0); in FixNullConstantType()
67 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in EquivalentPhisCleanup()
89 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in FixEnvironmentPhis()
241 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in RunPrimitiveTypePropagation()
441 DCHECK(graph_->HasIrreducibleLoops()); in ReplaceUninitializedStringPhis()
454 if (graph_->IsDebuggable()) { in RemoveRedundantUninitializedStrings()
469 new_instance->ReplaceWith(graph_->GetNullConstant()); in RemoveRedundantUninitializedStrings()
516 DCHECK(!graph_->IsInSsaForm()); in BuildSsa()
529 SsaRedundantPhiElimination(graph_).Run(); in BuildSsa()
[all …]
Dinduction_var_analysis_test.cc46 graph_ = CreateGraph(); in InductionVarAnalysisTest()
54 loop_preheader_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop()
55 graph_->AddBlock(loop_preheader_[d]); in BuildForLoop()
56 loop_header_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop()
57 graph_->AddBlock(loop_header_[d]); in BuildForLoop()
62 loop_body_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop()
63 graph_->AddBlock(loop_body_[d]); in BuildForLoop()
78 graph_->SetNumberOfVRegs(n + 3); in BuildLoopNest()
81 entry_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoopNest()
82 graph_->AddBlock(entry_); in BuildLoopNest()
[all …]
Dside_effects_analysis.cc24 block_effects_.resize(graph_->GetBlocks().size()); in Run()
25 loop_effects_.resize(graph_->GetBlocks().size()); in Run()
29 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in Run()
40 for (HBasicBlock* block : graph_->GetPostOrder()) { in Run()
Doptimizing_unit_test.h150 const std::vector<Edge>& adj) : graph_(graph) { in AdjacencyListGraph()
152 HBasicBlock* blk = new (alloc) HBasicBlock(graph_); in AdjacencyListGraph()
153 graph_->AddBlock(blk); in AdjacencyListGraph()
158 graph_->SetEntryBlock(entry); in AdjacencyListGraph()
159 graph_->SetExitBlock(exit); in AdjacencyListGraph()
167 graph_->ComputeDominanceInformation(); in AdjacencyListGraph()
205 return graph_->Dump(os, /* codegen_= */ nullptr, namer); in Dump()
209 HGraph* graph_;
220 graph_(nullptr), in OptimizingUnitTestHelper()
250 graph_ = new (allocator) HGraph(
[all …]
Dreference_type_propagation_test.cc43 ReferenceTypePropagationTestBase() : graph_(nullptr), propagation_(nullptr) { in ReferenceTypePropagationTestBase()
50 graph_ = CreateGraph(handles); in SetupPropagation()
52 ReferenceTypePropagation(graph_, Handle<mirror::DexCache>(), true, "test_prop"); in SetupPropagation()
58 return propagation_->MergeTypes(a, b, graph_->GetHandleCache()); in MergeTypes()
68 return ReferenceTypeInfo::Create(graph_->GetHandleCache()->GetObjectClassHandle(), is_exact); in ObjectType()
73 return ReferenceTypeInfo::Create(graph_->GetHandleCache()->GetStringClassHandle(), is_exact); in StringType()
77 HGraph* graph_; member in art::ReferenceTypePropagationTestBase
181 EXPECT_TRUE(graph_->GetInexactObjectRti().IsEqual(ObjectType(false))); in TEST_F()
289 AdjacencyListGraph alg(graph_, GetAllocator(), "start", "exit", edges); in RunVisitListTest()
292 HParameterValue(graph_->GetDexFile(), dex::TypeIndex(1), 1, DataType::Type::kReference); in RunVisitListTest()
[all …]
Dinduction_var_range_test.cc36 : graph_(CreateGraph()), in InductionVarRangeTest()
37 iva_(new (GetAllocator()) HInductionVarAnalysis(graph_)), in InductionVarRangeTest()
62 graph_->SetNumberOfVRegs(1); in BuildGraph()
63 entry_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph()
64 exit_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph()
65 graph_->AddBlock(entry_block_); in BuildGraph()
66 graph_->AddBlock(exit_block_); in BuildGraph()
67 graph_->SetEntryBlock(entry_block_); in BuildGraph()
68 graph_->SetExitBlock(exit_block_); in BuildGraph()
70 x_ = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in BuildGraph()
[all …]
Dssa_phi_elimination.cc34 ScopedArenaAllocator allocator(graph_->GetArenaStack()); in MarkDeadPhis()
46 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in MarkDeadPhis()
53 bool keep_alive = (graph_->IsDebuggable() && phi->HasEnvironmentUses()); in MarkDeadPhis()
95 for (HBasicBlock* block : graph_->GetPostOrder()) { in EliminateDeadPhis()
128 ScopedArenaAllocator allocator(graph_->GetArenaStack()); in Run()
136 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in Run()
143 graph_->GetCurrentInstructionId(), in Run()
Dsuperblock_cloner.cc274 ArenaBitVector visited(arena_, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in FindBackEdgesLocal()
277 ArenaBitVector visiting(arena_, graph_->GetBlocks().size(), false, kArenaAllocGraphBuilder); in FindBackEdgesLocal()
279 ArenaVector<size_t> successors_visited(graph_->GetBlocks().size(), in FindBackEdgesLocal()
320 for (auto block : graph_->GetBlocks()) { in RecalculateBackEdgesInfo()
329 block_entry = graph_->GetEntryBlock(); in RecalculateBackEdgesInfo()
367 for (HBasicBlock* block : graph_->GetPostOrder()) { in AnalyzeLoopsLocally()
381 for (HBasicBlock* block : graph_->GetPostOrder()) { in AnalyzeLoopsLocally()
399 graph_->ClearDominanceInformation(); in CleanUpControlFlow()
402 arena_, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in CleanUpControlFlow()
406 graph_->SimplifyCFG(); in CleanUpControlFlow()
[all …]
Dinstruction_builder.cc98 graph_(graph), in HInstructionBuilder()
125 const size_t vregs = graph_->GetNumberOfVRegs(); in GetLocalsFor()
176 for (HBasicBlock* current : graph_->GetReversePostOrder()) { in InitializeBlockLocals()
186 DCHECK_EQ(current_locals_->size(), graph_->GetNumberOfVRegs()) in InitializeBlockLocals()
302 graph_->GetArtMethod(), in InitializeInstruction()
359 graph_->GetBlocks().size(), in Build()
372 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in Build()
381 if (graph_->IsDebuggable() && code_generator_->GetCompilerOptions().IsJitCompiler()) { in Build()
465 graph_->GetBlocks().size(), in BuildIntrinsic()
470 current_block_ = graph_->GetEntryBlock(); in BuildIntrinsic()
[all …]

123