/art/compiler/optimizing/ |
D | builder.cc | 47 : graph_(graph), in HGraphBuilder() 61 : graph_(graph), in HGraphBuilder() 105 DCHECK(graph_->GetBlocks().empty()); in BuildGraph() 107 graph_->SetNumberOfVRegs(code_item_accessor_.RegistersSize()); in BuildGraph() 108 graph_->SetNumberOfInVRegs(code_item_accessor_.InsSize()); in BuildGraph() 109 graph_->SetMaximumNumberOfOutVRegs(code_item_accessor_.OutsSize()); in BuildGraph() 110 graph_->SetHasTryCatch(code_item_accessor_.TriesSize() != 0); in BuildGraph() 113 ScopedArenaAllocator local_allocator(graph_->GetArenaStack()); in BuildGraph() 114 HBasicBlockBuilder block_builder(graph_, dex_file_, code_item_accessor_, &local_allocator); in BuildGraph() 115 SsaBuilder ssa_builder(graph_, in BuildGraph() [all …]
|
D | licm_test.cc | 42 graph_ = CreateGraph(); in LICMTest() 50 entry_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 51 loop_preheader_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 52 loop_header_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 53 loop_body_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 54 return_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 55 exit_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoop() 57 graph_->AddBlock(entry_); in BuildLoop() 58 graph_->AddBlock(loop_preheader_); in BuildLoop() 59 graph_->AddBlock(loop_header_); in BuildLoop() [all …]
|
D | loop_optimization_test.cc | 34 graph_ = CreateGraph(); in SetUp() 36 iva_ = new (GetAllocator()) HInductionVarAnalysis(graph_); in SetUp() 39 codegen_ = CodeGenerator::Create(graph_, *compiler_options_); in SetUp() 42 graph_, *codegen_.get(), iva_, /* stats= */ nullptr); in SetUp() 48 graph_ = nullptr; in TearDown() 57 graph_->SetNumberOfVRegs(1); in BuildGraph() 58 entry_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph() 59 return_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph() 60 exit_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph() 61 graph_->AddBlock(entry_block_); in BuildGraph() [all …]
|
D | bounds_check_elimination_test.cc | 37 BoundsCheckEliminationTest() : graph_(CreateGraph()) { in BoundsCheckEliminationTest() 38 graph_->SetHasBoundsChecks(true); in BoundsCheckEliminationTest() 44 graph_->BuildDominatorTree(); in RunBCE() 46 InstructionSimplifier(graph_, /* codegen= */ nullptr).Run(); in RunBCE() 48 SideEffectsAnalysis side_effects(graph_); in RunBCE() 51 GVNOptimization(graph_, side_effects).Run(); in RunBCE() 53 HInductionVarAnalysis induction(graph_); in RunBCE() 56 BoundsCheckElimination(graph_, side_effects, &induction).Run(); in RunBCE() 59 HGraph* graph_; member in art::BoundsCheckEliminationTest 67 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F() [all …]
|
D | ssa_liveness_analysis_test.cc | 34 graph_ = CreateGraph(); in SetUp() 36 codegen_ = CodeGenerator::Create(graph_, *compiler_options_); in SetUp() 39 entry_ = new (GetAllocator()) HBasicBlock(graph_); in SetUp() 40 graph_->AddBlock(entry_); in SetUp() 41 graph_->SetEntryBlock(entry_); in SetUp() 53 HGraph* graph_; member in art::SsaLivenessAnalysisTest 61 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32); in TEST_F() 69 graph_->BuildDominatorTree(); in TEST_F() 70 SsaLivenessAnalysis ssa_analysis(graph_, codegen_.get(), GetScopedAllocator()); in TEST_F() 81 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F() [all …]
|
D | load_store_analysis_test.cc | 27 LoadStoreAnalysisTest() : graph_(CreateGraph()) { } in LoadStoreAnalysisTest() 29 HGraph* graph_; member in art::LoadStoreAnalysisTest 33 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TEST_F() 34 graph_->AddBlock(entry); in TEST_F() 35 graph_->SetEntryBlock(entry); in TEST_F() 48 graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference); in TEST_F() 50 graph_->GetDexFile(), dex::TypeIndex(1), 1, DataType::Type::kInt32); in TEST_F() 51 HInstruction* c1 = graph_->GetIntConstant(1); in TEST_F() 52 HInstruction* c2 = graph_->GetIntConstant(2); in TEST_F() 53 HInstruction* c3 = graph_->GetIntConstant(3); in TEST_F() [all …]
|
D | block_builder.cc | 32 graph_(graph), in HBasicBlockBuilder() 55 block = new (allocator_) HBasicBlock(graph_, semantic_dex_pc); in MaybeCreateBlockAt() 147 HBasicBlock* block = graph_->GetEntryBlock(); in ConnectBasicBlocks() 148 graph_->AddBlock(block); in ConnectBasicBlocks() 170 graph_->AddBlock(block); in ConnectBasicBlocks() 192 block->AddSuccessor(graph_->GetExitBlock()); in ConnectBasicBlocks() 204 graph_->AddBlock(block); in ConnectBasicBlocks() 221 graph_->AddBlock(graph_->GetExitBlock()); in ConnectBasicBlocks() 250 DCHECK(!graph_->GetEntryBlock()->GetSuccessors().empty()) in MightHaveLiveNormalPredecessors() 287 for (HBasicBlock* block : graph_->GetBlocks()) { in InsertTryBoundaryBlocks() [all …]
|
D | dead_code_elimination.cc | 231 if (graph_->HasTryCatch()) { in SimplifyAlwaysThrows() 234 HBasicBlock* exit = graph_->GetExitBlock(); in SimplifyAlwaysThrows() 242 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in SimplifyAlwaysThrows() 276 graph_->ClearLoopInformation(); in SimplifyAlwaysThrows() 277 graph_->ClearDominanceInformation(); in SimplifyAlwaysThrows() 278 graph_->BuildDominatorTree(); in SimplifyAlwaysThrows() 325 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in SimplifyIfs() 412 graph_->ClearLoopInformation(); in SimplifyIfs() 413 graph_->ClearDominanceInformation(); in SimplifyIfs() 414 graph_->BuildDominatorTree(); in SimplifyIfs() [all …]
|
D | select_generator_test.cc | 31 AddParameter(new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in InitGraphAndParameters() 49 HParameterValue* bool_param = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in ConstructBasicGraphForSelect() 54 HIntConstant* const1 = graph_->GetIntConstant(1); in ConstructBasicGraphForSelect() 70 graph_->BuildDominatorTree(); in CheckGraphAndTrySelectGenerator() 73 SideEffectsAnalysis side_effects(graph_); in CheckGraphAndTrySelectGenerator() 75 return HSelectGenerator(graph_, /*handles*/ nullptr, /*stats*/ nullptr).Run(); in CheckGraphAndTrySelectGenerator() 85 ArenaVector<HInstruction*> current_locals({parameters_[0], graph_->GetIntConstant(1)}, in TEST_F()
|
D | load_store_elimination_test.cc | 32 graph_->BuildDominatorTree(); in PerformLSE() 33 SideEffectsAnalysis side_effects(graph_); in PerformLSE() 35 LoadStoreElimination lse(graph_, side_effects, /*stats=*/ nullptr); in PerformLSE() 42 HInstruction* c1 = graph_->GetIntConstant(1); in CreateEntryBlockInstructions() 43 HInstruction* c4 = graph_->GetIntConstant(4); in CreateEntryBlockInstructions() 71 HInstruction* c0 = graph_->GetIntConstant(0); in CreateTestControlFlowGraph() 72 HInstruction* c1 = graph_->GetIntConstant(1); in CreateTestControlFlowGraph() 73 HInstruction* c128 = graph_->GetIntConstant(128); in CreateTestControlFlowGraph() 172 HInstruction* c1 = graph_->GetIntConstant(1); in AddVecStore() 217 data = graph_->GetIntConstant(1); in AddArraySet() [all …]
|
D | scheduler_test.cc | 70 SchedulerTest() : graph_(CreateGraph()) { } in SchedulerTest() 74 HBasicBlock* entry = new (GetAllocator()) HBasicBlock(graph_); in TestBuildDependencyGraphAndSchedule() 75 HBasicBlock* block1 = new (GetAllocator()) HBasicBlock(graph_); in TestBuildDependencyGraphAndSchedule() 76 graph_->AddBlock(entry); in TestBuildDependencyGraphAndSchedule() 77 graph_->AddBlock(block1); in TestBuildDependencyGraphAndSchedule() 78 graph_->SetEntryBlock(entry); in TestBuildDependencyGraphAndSchedule() 95 HInstruction* array = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in TestBuildDependencyGraphAndSchedule() 99 HInstruction* c1 = graph_->GetIntConstant(1); in TestBuildDependencyGraphAndSchedule() 100 HInstruction* c2 = graph_->GetIntConstant(10); in TestBuildDependencyGraphAndSchedule() 134 graph_->GetArtMethod(), in TestBuildDependencyGraphAndSchedule() [all …]
|
D | constant_folding_test.cc | 35 ConstantFoldingTest() : graph_(nullptr) { } in ConstantFoldingTest() 43 graph_ = CreateCFG(data, return_type); in TestCode() 54 ASSERT_NE(graph_, nullptr); in TestCodeOnReadyGraph() 56 StringPrettyPrinter printer_before(graph_); in TestCodeOnReadyGraph() 61 HConstantFolding(graph_, "constant_folding").Run(); in TestCodeOnReadyGraph() 62 GraphChecker graph_checker_cf(graph_); in TestCodeOnReadyGraph() 66 StringPrettyPrinter printer_after_cf(graph_); in TestCodeOnReadyGraph() 71 check_after_cf(graph_); in TestCodeOnReadyGraph() 73 HDeadCodeElimination(graph_, /* stats= */ nullptr, "dead_code_elimination").Run(); in TestCodeOnReadyGraph() 74 GraphChecker graph_checker_dce(graph_); in TestCodeOnReadyGraph() [all …]
|
D | reference_type_propagation_test.cc | 33 ReferenceTypePropagationTest() : graph_(nullptr), propagation_(nullptr) { } in ReferenceTypePropagationTest() 38 graph_ = CreateGraph(handles); in SetupPropagation() 39 propagation_ = new (GetAllocator()) ReferenceTypePropagation(graph_, in SetupPropagation() 49 return propagation_->MergeTypes(a, b, graph_->GetHandleCache()); in MergeTypes() 59 return ReferenceTypeInfo::Create(graph_->GetHandleCache()->GetObjectClassHandle(), is_exact); in ObjectType() 64 return ReferenceTypeInfo::Create(graph_->GetHandleCache()->GetStringClassHandle(), is_exact); in StringType() 68 HGraph* graph_; member in art::ReferenceTypePropagationTest 83 EXPECT_TRUE(graph_->GetInexactObjectRti().IsEqual(ObjectType(false))); in TEST_F()
|
D | inliner.cc | 133 } else if (graph_->IsDebuggable()) { in Run() 143 if (outermost_graph_ == graph_) { in Run() 144 total_number_of_instructions_ = CountNumberOfInstructions(graph_); in Run() 163 ArenaVector<HBasicBlock*> blocks = graph_->GetReversePostOrder(); in Run() 678 ArtMethod* caller = graph_->GetArtMethod(); in GetInlineCacheJIT() 807 HInstanceFieldGet* result = new (graph_->GetAllocator()) HInstanceFieldGet( in BuildGetReceiverClass() 867 graph_->GetHandleCache()->NewHandle(GetMonomorphicType(classes)); in TryInlineMonomorphicCall() 900 ReferenceTypePropagation rtp_fixup(graph_, in TryInlineMonomorphicCall() 914 HShouldDeoptimizeFlag* deopt_flag = new (graph_->GetAllocator()) in AddCHAGuard() 915 HShouldDeoptimizeFlag(graph_->GetAllocator(), dex_pc); in AddCHAGuard() [all …]
|
D | superblock_cloner_test.cc | 37 AddParameter(new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in InitGraphAndParameters() 67 HIntConstant* const_0 = graph_->GetIntConstant(0); in CreateBasicLoopDataFlow() 68 HIntConstant* const_1 = graph_->GetIntConstant(1); in CreateBasicLoopDataFlow() 69 HIntConstant* const_128 = graph_->GetIntConstant(128); in CreateBasicLoopDataFlow() 104 graph_->SetHasBoundsChecks(true); in CreateBasicLoopDataFlow() 123 graph_->BuildDominatorTree(); in TEST_F() 127 CloneAndReplaceInstructionVisitor visitor(graph_); in TEST_F() 155 graph_->BuildDominatorTree(); in TEST_F() 159 arena, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in TEST_F() 166 SuperblockCloner cloner(graph_, in TEST_F() [all …]
|
D | optimizing_unit_test.h | 114 graph_(nullptr), in OptimizingUnitTestHelper() 144 graph_ = new (allocator) HGraph( 151 return graph_; 192 graph_->SetEntryBlock(entry_block_); in InitGraph() 193 graph_->SetExitBlock(exit_block_); in InitGraph() 208 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in AddNewBlock() 209 graph_->AddBlock(block); in AddNewBlock() 221 return CheckGraph(graph_); in CheckGraph() 232 return CheckGraphSkipRefTypeInfoChecks(graph_); in CheckGraphSkipRefTypeInfoChecks() 240 graph_->GetArtMethod(), in ManuallyBuildEnvFor() [all …]
|
D | side_effects_analysis.cc | 24 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()
|
D | ssa_builder.cc | 34 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 …]
|
D | induction_var_analysis_test.cc | 45 graph_ = CreateGraph(); in InductionVarAnalysisTest() 53 loop_preheader_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop() 54 graph_->AddBlock(loop_preheader_[d]); in BuildForLoop() 55 loop_header_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop() 56 graph_->AddBlock(loop_header_[d]); in BuildForLoop() 61 loop_body_[d] = new (GetAllocator()) HBasicBlock(graph_); in BuildForLoop() 62 graph_->AddBlock(loop_body_[d]); in BuildForLoop() 77 graph_->SetNumberOfVRegs(n + 3); in BuildLoopNest() 80 entry_ = new (GetAllocator()) HBasicBlock(graph_); in BuildLoopNest() 81 graph_->AddBlock(entry_); in BuildLoopNest() [all …]
|
D | ssa_phi_elimination.cc | 34 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()
|
D | induction_var_range_test.cc | 35 : graph_(CreateGraph()), in InductionVarRangeTest() 36 iva_(new (GetAllocator()) HInductionVarAnalysis(graph_)), in InductionVarRangeTest() 61 graph_->SetNumberOfVRegs(1); in BuildGraph() 62 entry_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph() 63 exit_block_ = new (GetAllocator()) HBasicBlock(graph_); in BuildGraph() 64 graph_->AddBlock(entry_block_); in BuildGraph() 65 graph_->AddBlock(exit_block_); in BuildGraph() 66 graph_->SetEntryBlock(entry_block_); in BuildGraph() 67 graph_->SetExitBlock(exit_block_); in BuildGraph() 69 x_ = new (GetAllocator()) HParameterValue(graph_->GetDexFile(), in BuildGraph() [all …]
|
D | code_sinking.cc | 29 HBasicBlock* exit = graph_->GetExitBlock(); in Run() 258 ScopedArenaAllocator allocator(graph_->GetArenaStack()); in SinkCodeToUncommonBranch() 260 size_t number_of_instructions = graph_->GetCurrentInstructionId(); in SinkCodeToUncommonBranch() 264 ArenaBitVector post_dominated(&allocator, graph_->GetBlocks().size(), /* expandable= */ false); in SinkCodeToUncommonBranch() 277 for (HBasicBlock* block : graph_->GetPostOrder()) { in SinkCodeToUncommonBranch() 305 for (size_t i = 0, e = graph_->GetBlocks().size(); i < e; ++i) { in SinkCodeToUncommonBranch() 307 finder.Update(graph_->GetBlocks()[i]); in SinkCodeToUncommonBranch() 308 AddInputs(graph_->GetBlocks()[i], processed_instructions, post_dominated, &worklist); in SinkCodeToUncommonBranch() 351 if (graph_->IsDebuggable() || in SinkCodeToUncommonBranch() 354 (user->IsSuspendCheck() && graph_->IsCompilingOsr())) { in SinkCodeToUncommonBranch()
|
D | superblock_cloner.cc | 274 ArenaBitVector visited(arena_, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in FindBackEdgesLocal() 279 ArenaBitVector visiting(arena_, graph_->GetBlocks().size(), false, kArenaAllocGraphBuilder); in FindBackEdgesLocal() 281 ArenaVector<size_t> successors_visited(graph_->GetBlocks().size(), in FindBackEdgesLocal() 322 for (auto block : graph_->GetBlocks()) { in RecalculateBackEdgesInfo() 331 block_entry = graph_->GetEntryBlock(); in RecalculateBackEdgesInfo() 369 for (HBasicBlock* block : graph_->GetPostOrder()) { in AnalyzeLoopsLocally() 383 for (HBasicBlock* block : graph_->GetPostOrder()) { in AnalyzeLoopsLocally() 401 graph_->ClearDominanceInformation(); in CleanUpControlFlow() 404 arena_, graph_->GetBlocks().size(), false, kArenaAllocSuperblockCloner); in CleanUpControlFlow() 408 graph_->SimplifyCFG(); in CleanUpControlFlow() [all …]
|
D | side_effects_analysis.h | 30 graph_(graph), in HOptimization() 49 HGraph* graph_; variable
|
D | licm.cc | 88 visited = new (graph_->GetAllocator()) ArenaBitVector(graph_->GetAllocator(), in Run() 89 graph_->GetBlocks().size(), in Run() 95 for (HBasicBlock* block : graph_->GetPostOrder()) { in Run()
|