/arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/ |
D | reg_alloc_base.cpp | 75 RegAllocStat st(GetGraph()->GetAnalysis<LivenessAnalyzer>().GetLifeIntervals()); in RunImpl() 88 GetGraph()->InitUsedRegs<DataType::INT64>(&GetRegMask().GetVector()); in Prepare() 89 GetGraph()->InitUsedRegs<DataType::FLOAT64>(&GetVRegMask().GetVector()); in Prepare() 91 GetGraph()->RunPass<DominatorsTree>(); in Prepare() 96 bool res = GetGraph()->RunPass<LivenessAnalyzer>(); in Prepare() 97 if (GetGraph()->IsBytecodeOptimizer()) { in Prepare() 98 GetGraph()->InitDefaultLocations(); in Prepare() 111 GetGraph()->GetPassManager()->DumpLifeIntervals(GetPassName()); in Resolve() 115 GetGraph()->SetStackSlotsCount(GetTotalSlotsCount()); in Resolve() 118 RegAllocResolver(GetGraph()).Resolve(); in Resolve() [all …]
|
D | reg_alloc_resolver.cpp | 33 for (auto block : GetGraph()->GetBlocksRPO()) { in Resolve() 40 if (GetGraph()->IsInstThrowable(inst)) { in Resolve() 49 auto spill_fill_inst = GetGraph()->CreateInstSpillFill(); in AddCatchPhiMoves() 51 auto handlers = GetGraph()->GetThrowableInstHandlers(inst); in AddCatchPhiMoves() 129 sf_inst = GetGraph()->CreateInstSpillFill(); in AddMoveToFixedLocation() 135 auto type = ConvertRegType(GetGraph(), inst->GetInputType(input_num)); in AddMoveToFixedLocation() 138 GetGraph()->SetRegUsage(fixed_location.GetValue(), type); in AddMoveToFixedLocation() 181 save_state->CreateRootsStackMask(GetGraph()->GetAllocator()); in PropagateCallerMasks() 203 AddLocationToRoots(sibling->GetLocation(), target_ss, GetGraph()); in FillSaveStateRootsMask() 247 GetGraph()->SetRegUsage(reg, reg_type); in ResolveOutput() [all …]
|
/arkcompiler/runtime_core/compiler/tests/ |
D | rpo_test.cpp | 26 for (auto block : GetGraph()->GetBlocksRPO()) { in Check_Subsequence() 39 auto block = GetGraph()->CreateStartBlock(); in TEST_F() 81 GRAPH(GetGraph()) in TEST_F() 107 auto exit = GetGraph()->GetEndBlock(); in TEST_F() 113 auto M = GetGraph()->CreateEmptyBlock(); in TEST_F() 114 auto N = GetGraph()->CreateEmptyBlock(); in TEST_F() 115 auto ret1 = GetGraph()->CreateInstReturnVoid(); in TEST_F() 117 auto K = GetGraph()->CreateEmptyBlock(); in TEST_F() 118 auto ret2 = GetGraph()->CreateInstReturnVoid(); in TEST_F() 124 auto cmp = GetGraph()->CreateInstCompare(); in TEST_F() [all …]
|
D | dom_tree_test.cpp | 53 GRAPH(GetGraph()) in TEST_F() 61 auto block = GetGraph()->GetStartBlock(); in TEST_F() 62 GetGraph()->RunPass<DominatorsTree>(); in TEST_F() 64 EXPECT_TRUE(GetGraph()->IsAnalysisValid<DominatorsTree>()); in TEST_F() 105 GRAPH(GetGraph()) in TEST_F() 134 auto entry = GetGraph()->GetStartBlock(); in TEST_F() 141 auto exit = GetGraph()->GetEndBlock(); in TEST_F() 144 GetGraph()->RunPass<DominatorsTree>(); in TEST_F() 145 EXPECT_TRUE(GetGraph()->IsAnalysisValid<DominatorsTree>()); in TEST_F() 148 auto G = GetGraph()->CreateEmptyBlock(); in TEST_F() [all …]
|
D | move_constants_test.cpp | 26 GRAPH(GetGraph()) in TEST_F() 88 bool result = GetGraph()->RunPass<MoveConstants>(); in TEST_F() 91 GraphChecker(GetGraph()).Check(); in TEST_F() 92 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph_et)); in TEST_F() 97 GRAPH(GetGraph()) in TEST_F() 163 bool result = GetGraph()->RunPass<MoveConstants>(); in TEST_F() 166 GraphChecker(GetGraph()).Check(); in TEST_F() 167 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph_et)); in TEST_F() 172 GRAPH(GetGraph()) in TEST_F() 260 bool result = GetGraph()->RunPass<MoveConstants>(); in TEST_F() [all …]
|
D | cleanup_test.cpp | 26 GRAPH(GetGraph()) in TEST_F() 35 ASSERT_TRUE(GetGraph()->RunPass<Cleanup>()); in TEST_F() 45 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 50 GRAPH(GetGraph()) in TEST_F() 77 ASSERT_TRUE(GetGraph()->RunPass<Cleanup>()); in TEST_F() 102 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 107 GRAPH(GetGraph()) in TEST_F() 129 ASSERT_TRUE(GetGraph()->RunPass<Cleanup>()); in TEST_F() 150 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 155 GRAPH(GetGraph()) in TEST_F() [all …]
|
D | vn_test.cpp | 26 Graph *GetGraph() override in GetGraph() function in panda::compiler::VNTest 38 GRAPH(GetGraph()) in TEST_F() 88 GetGraph()->RunPass<ValNum>(); in TEST_F() 89 GraphChecker(GetGraph()).Check(); in TEST_F() 90 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph_et)); in TEST_F() 96 GRAPH(GetGraph()) in TEST_F() 186 GetGraph()->RunPass<ValNum>(); in TEST_F() 187 GraphChecker(GetGraph()).Check(); in TEST_F() 188 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph_et)); in TEST_F() 194 GRAPH(GetGraph()) in TEST_F() [all …]
|
D | inst_test.cpp | 49 GRAPH(GetGraph()) in TEST_F() 124 GraphChecker(GetGraph()).Check(); in TEST_F() 134 GraphChecker(GetGraph()).Check(); in TEST_F() 145 GRAPH(GetGraph()) in TEST_F() 161 GRAPH(GetGraph()) in TEST_F() 183 GRAPH(GetGraph()) in TEST_F() 190 auto start = GetGraph()->GetStartBlock(); in TEST_F() 193 auto const1 = GetGraph()->FindOrCreateConstant(val); in TEST_F() 197 auto const2 = GetGraph()->FindOrCreateConstant(val1); in TEST_F() 202 GraphChecker(GetGraph()).Check(); in TEST_F() [all …]
|
D | reg_alloc_graph_coloring_test.cpp | 32 … auto param_liveness = GetGraph()->GetAnalysis<LivenessAnalyzer>().GetInstLifeIntervals(param); in GetParameterSpillFilll() 42 if (GetGraph()->GetArch() == Arch::AARCH32) { in TEST_F() 46 GRAPH(GetGraph()) in TEST_F() 70 auto result = GetGraph()->RunPass<RegAllocGraphColoring>(); in TEST_F() 72 GraphChecker(GetGraph()).Check(); in TEST_F() 77 auto arch = GetGraph()->GetArch(); in TEST_F() 90 if (GetGraph()->GetArch() == Arch::AARCH32) { in TEST_F() 94 GRAPH(GetGraph()) in TEST_F() 140 auto result = GetGraph()->RunPass<RegAllocGraphColoring>(); in TEST_F() 142 GraphChecker(GetGraph()).Check(); in TEST_F()
|
D | iterators_test.cpp | 190 GRAPH(GetGraph()) in TEST_F() 203 GRAPH(GetGraph()) in TEST_F() 212 inst = GetGraph()->CreateInst(Opcode::Phi); in TEST_F() 219 GRAPH(GetGraph()) in TEST_F() 228 inst = GetGraph()->CreateInst(Opcode::Add); in TEST_F() 235 GRAPH(GetGraph()) in TEST_F() 248 inst = GetGraph()->CreateInst(Opcode::Phi); in TEST_F() 250 inst = GetGraph()->CreateInst(Opcode::Add); in TEST_F() 258 inst = GetGraph()->CreateInst(Opcode::Phi); in TEST_F() 260 inst = GetGraph()->CreateInst(Opcode::Add); in TEST_F() [all …]
|
D | liveness_analyzer_test.cpp | 71 GRAPH(GetGraph()) in TEST_F() 109 EXPECT_TRUE(GetGraph()->RunPass<LivenessAnalyzer>()); in TEST_F() 111 const auto &blocks = GetGraph()->GetAnalysis<LivenessAnalyzer>().GetLinearizedBlocks(); in TEST_F() 112 …Check_Subsequence(blocks, GetBlocksById(GetGraph(), {0, 2, 4, 5, 11, 12, 13, 1, 3, 6, 7, 8, 9, 10,… in TEST_F() 117 GRAPH(GetGraph()) in TEST_F() 180 EXPECT_TRUE(GetGraph()->RunPass<LivenessAnalyzer>()); in TEST_F() 182 const auto &blocks = GetGraph()->GetAnalysis<LivenessAnalyzer>().GetLinearizedBlocks(); in TEST_F() 184 … GetBlocksById(GetGraph(), {0, 100, 6, 2, 5, 4, 21, 17, 18, 24, 19, 36, 20, 14, 3, 43, 31, 7, 1})); in TEST_F() 201 GRAPH(GetGraph()) in TEST_F() 218 EXPECT_TRUE(GetGraph()->RunPass<LivenessAnalyzer>()); in TEST_F() [all …]
|
D | ir_builder_test.cpp | 79 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckSimple() 120 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckSimpleWithImm() 156 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckCmp() 188 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckFloatCmp() 255 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckCondJump() 321 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckCondJumpWithZero() 363 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 400 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 428 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() 458 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F() [all …]
|
D | basicblock_test.cpp | 85 GRAPH(GetGraph()) in TEST_F() 146 GetGraph()->DisconnectBlock(&BB(7)); in TEST_F() 154 GetGraph()->InvalidateAnalysis<LoopAnalyzer>(); in TEST_F() 155 GetGraph()->RunPass<LoopAnalyzer>(); in TEST_F() 156 GraphChecker(GetGraph()).Check(); in TEST_F() 170 GRAPH(GetGraph()) in TEST_F() 190 GetGraph()->RemoveEmptyBlockWithPhis(&BB(3)); in TEST_F() 201 GRAPH(GetGraph()) in TEST_F() 233 GRAPH(GetGraph()) in TEST_F() 286 GRAPH(GetGraph()) in TEST_F() [all …]
|
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/ |
D | ir_builder.cpp | 33 … << GetGraph()->GetRuntime()->GetClassNameFromMethod(GetMethod()) << "." in RunImpl() 34 << GetGraph()->GetRuntime()->GetMethodName(GetMethod()) in RunImpl() 35 … << "(args=" << GetGraph()->GetRuntime()->GetMethodTotalArgumentsCount(GetMethod()) in RunImpl() 36 … << ", regs=" << GetGraph()->GetRuntime()->GetMethodRegistersCount(GetMethod()) in RunImpl() 39 auto instructions_buf = GetGraph()->GetRuntime()->GetMethodCode(GetMethod()); in RunImpl() 40 …BytecodeInstructions pbc_instructions(instructions_buf, GetGraph()->GetRuntime()->GetMethodCodeSiz… in RunImpl() 41 size_t vregs_count = GetGraph()->GetRuntime()->GetMethodRegistersCount(GetMethod()) + in RunImpl() 42 GetGraph()->GetRuntime()->GetMethodTotalArgumentsCount(GetMethod()) + 1; in RunImpl() 46 GetGraph()->SetVRegsCount(vregs_count); in RunImpl() 48 GetGraph()->RunPass<DominatorsTree>(); in RunImpl() [all …]
|
D | inst_builder.h | 41 instructions_buf_(GetGraph()->GetRuntime()->GetMethodCode(GetGraph()->GetMethod())), in InstBuilder() 44 no_type_marker_ = GetGraph()->NewMarker(); 45 visited_block_marker_ = GetGraph()->NewMarker(); 55 auto catch_phi = GetGraph()->CreateInstCatchPhi(); 71 GetGraph()->EraseMarker(no_type_marker_); in ~InstBuilder() 72 GetGraph()->EraseMarker(visited_block_marker_); in ~InstBuilder() 126 ASSERT(GetGraph()->IsBytecodeOptimizer()); in TryFillInstIdTypePair() 127 ASSERT(GetGraph()->IsDynamicMethod()); in TryFillInstIdTypePair() 128 GetGraph()->GetRuntime()->FillInstIdTypePairByPc(id, pc); in TryFillInstIdTypePair() 200 auto inst = GetGraph()->FindOrCreateConstant<uint32_t>(value); in FindOrCreate32BitConstant() [all …]
|
D | inst_builder.cpp | 23 SetCurrentBlock(GetGraph()->GetStartBlock()); in Prepare() 25 GetGraph()->ResetParameterInfo(); in Prepare() 30 auto param_inst = GetGraph()->AddNewParameter(i); in Prepare() 33 ASSERT(!GetGraph()->IsBytecodeOptimizer() || reg_num != INVALID_REG); in Prepare() 36 SetParamSpillFill(GetGraph(), param_inst, num_args, i, type); in Prepare() 63 auto phi = GetGraph()->CreateInstPhi(); in UpdateDefsForLoopHead() 106 auto phi = GetGraph()->CreateInstPhi(); in UpdateDefs() 129 GetGraph()->AppendThrowableInst(throwable_inst, catch_bb); in AddCatchPhiInputs() 221 for (auto bb : GetGraph()->GetBlocksRPO()) { in FixInstructions() 240 for (auto bb : GetGraph()->GetBlocksRPO()) { in FixInstructions() [all …]
|
/arkcompiler/runtime_core/compiler/optimizer/analysis/ |
D | loop_analyzer.cpp | 25 GetGraph()->RunPass<DominatorsTree>(); in RunImpl() 30 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() 33 SearchInfiniteLoops(GetGraph()->GetRootLoop()); in RunImpl() 39 for (auto block : GetGraph()->GetVectorBlocks()) { in ResetLoopInfo() 44 GetGraph()->SetRootLoop(nullptr); in ResetLoopInfo() 45 GetGraph()->SetHasIrreducibleLoop(false); in ResetLoopInfo() 46 GetGraph()->SetHasInfiniteLoop(false); in ResetLoopInfo() 52 …auto loop = GetGraph()->GetAllocator()->New<Loop>(GetGraph()->GetAllocator(), loop_header, loop_co… in CreateNewLoop() 59 ASSERT(GetGraph()->GetRootLoop() == nullptr); in CreateRootLoop() 60 …auto root_loop = GetGraph()->GetAllocator()->New<Loop>(GetGraph()->GetAllocator(), nullptr, loop_c… in CreateRootLoop() [all …]
|
D | rpo.cpp | 44 size_t blocks_count = GetGraph()->GetAliveBlocksCount(); in RunImpl() 49 marker_ = GetGraph()->NewMarker(); in RunImpl() 51 DFS(GetGraph()->GetStartBlock(), &blocks_count); in RunImpl() 55 for (auto bb : *GetGraph()) { in RunImpl() 63 GetGraph()->EraseMarker(marker_); in RunImpl()
|
D | linear_order.cpp | 131 auto counter0 = GetGraph()->GetBranchCounter(block, true); in LeastLikelySuccessor() 132 auto counter1 = GetGraph()->GetBranchCounter(block, false); in LeastLikelySuccessor() 187 if (GetGraph()->IsBytecodeOptimizer()) { in RunImpl() 190 for (auto bb : GetGraph()->GetBlocksRPO()) { in RunImpl() 196 marker_ = GetGraph()->NewMarker(); in RunImpl() 197 size_t blocks_count = GetGraph()->GetAliveBlocksCount(); in RunImpl() 201 DFSAndDeferLeastFrequentBranches<true>(GetGraph()->GetStartBlock(), &blocks_count); in RunImpl() 205 for (auto bb : *GetGraph()) { in RunImpl() 214 GetGraph()->EraseMarker(marker_); in RunImpl()
|
/arkcompiler/runtime_core/compiler/optimizer/ir/ |
D | graph_checker.cpp | 34 GetGraph()->GetPassManager()->SetCheckMode(true); in GraphChecker() 84 if (!GetGraph()->IsDynamicMethod()) { in Check() 85 InstChecker::Run(GetGraph()); in Check() 89 if (GetGraph()->IsAnalysisValid<DominatorsTree>()) { in Check() 92 GetGraph()->RunPass<DominatorsTree>(); in Check() 94 if (GetGraph()->IsAnalysisValid<LoopAnalyzer>()) { in Check() 97 GetGraph()->RunPass<LoopAnalyzer>(); in Check() 103 for (auto block : GetGraph()->GetVectorBlocks()) { in Check() 108 ASSERT_PRINT(block->GetGraph() == GetGraph(), "Block linked to incorrect graph"); in Check() 113 ASSERT_PRINT(blocks_count == GetGraph()->GetBlocksRPO().size(), "There is disconnected block"); in Check() [all …]
|
D | graph_cloner.cpp | 39 …allocator_->New<Graph>(allocator_, local_allocator_, GetGraph()->GetArch(), GetGraph()->GetMethod(… in CloneGraph() 40 … GetGraph()->GetRuntime(), GetGraph()->GetParentGraph(), GetGraph()->GetMode()); in CloneGraph() 41 new_graph->SetCurrentInstructionId(GetGraph()->GetCurrentInstructionId()); in CloneGraph() 42 …CloneBlocksAndInstructions<InstCloneType::CLONE_ALL, false>(GetGraph()->GetVectorBlocks(), new_gra… in CloneGraph() 45 new_graph->GetPassManager()->SetCheckMode(GetGraph()->GetPassManager()->IsCheckMode()); in CloneGraph() 47 new_graph->SetBitFields(GetGraph()->GetBitFields()); in CloneGraph() 48 new_graph->InitUsedRegs<DataType::INT64>(GetGraph()->GetUsedRegs<DataType::INT64>()); in CloneGraph() 49 new_graph->InitUsedRegs<DataType::FLOAT64>(GetGraph()->GetUsedRegs<DataType::FLOAT64>()); in CloneGraph() 60 if (GetGraph()->IsAnalysisValid<DominatorsTree>()) { in CloneAnalyses() 62 for (auto block : GetGraph()->GetBlocksRPO()) { in CloneAnalyses() [all …]
|
D | graph_cloner.h | 129 auto marker_holder = MarkerHolder(GetGraph()); in UnrollLoopBody() 135 … CloneBlocksAndInstructions<InstCloneType::CLONE_ALL, true>(*unroll_data->blocks, GetGraph()); in UnrollLoopBody() 187 … ASSERT_PRINT(block->GetGraph() == GetGraph(), "GraphCloner probably caught disconnected block"); in GetClone() 204 ASSERT_PRINT(inst->GetBasicBlock()->GetGraph() == GetGraph(), in GetClone() 220 clone_blocks_.resize(GetGraph()->GetVectorBlocks().size(), nullptr); in CloneBlocksAndInstructions() 242 clone->AppendInst(CloneInstruction(inst, inst_count, clone->GetGraph())); in CloneInstructions() 247 auto phi_clone = CloneInstruction(phi, inst_count, clone->GetGraph()); in CloneInstructions() 263 if (inst->GetBasicBlock()->GetGraph() != target_graph) { in CloneInstruction() 321 Graph *GetGraph() in GetGraph() function
|
/arkcompiler/runtime_core/compiler/optimizer/ |
D | pass_manager.cpp | 67 ASSERT(GetGraph()->GetRuntime() != nullptr); in GetFileName() 78 if (GetGraph()->GetParentGraph() != nullptr) { in GetFileName() 81 ss_filename << GetGraph()->GetRuntime()->GetClassNameFromMethod(GetGraph()->GetMethod()) << "_" in GetFileName() 82 << GetGraph()->GetRuntime()->GetMethodName(GetGraph()->GetMethod()); in GetFileName() 83 if (GetGraph()->IsOsrMode()) { in GetFileName() 103 GetGraph()->Dump(&strm); in DumpGraph() 109 if (!GetGraph()->IsAnalysisValid<LivenessAnalyzer>()) { in DumpLifeIntervals() 118 GetGraph()->GetAnalysis<LivenessAnalyzer>().DumpLifeIntervals(strm); in DumpLifeIntervals() 134 if (first_execution_ && GetGraph()->GetParentGraph() == nullptr) { in RunPass()
|
/arkcompiler/runtime_core/compiler/optimizer/optimizations/ |
D | cleanup.cpp | 38 GetGraph()->RunPass<DominatorsTree>(); in RunImpl() 39 GetGraph()->RunPass<LoopAnalyzer>(); in RunImpl() 47 for (auto bb : GetGraph()->GetVectorBlocks()) { in RunImpl() 82 for (auto bb : GetGraph()->GetVectorBlocks()) { in RunImpl() 101 auto marker_holder = MarkerHolder(GetGraph()); in RunOnce() 107 if (bb->GetGraph() == nullptr) { in RunOnce() 184 GetGraph()->GetEventWriter().EventCleanup(phi->GetId(), phi->GetPc()); in RemoveDeadPhi() 235 GetGraph()->RemoveEmptyBlockWithPhis(bb, bad_loop); in ProcessBB() 237 GetGraph()->InvalidateAnalysis<LoopAnalyzer>(); in ProcessBB() 238 GetGraph()->RunPass<LoopAnalyzer>(); in ProcessBB() [all …]
|
D | vn.cpp | 90 ValNum::ValNum(Graph *graph) : Optimization(graph), map_insts_(GetGraph()->GetLocalAllocator()->Ada… in ValNum() 112 GetGraph()->GetEventWriter().EventGvn(inst->GetId(), inst->GetPc(), equiv_inst->GetId(), in TryToApplyCse() 132 auto obj = GetGraph()->GetLocalAllocator()->New<VnObject>(); in FindEqualVnOrCreateNew() 139 InstVector equiv_insts(GetGraph()->GetLocalAllocator()->Adapter()); in FindEqualVnOrCreateNew() 153 GetGraph()->RunPass<DominatorsTree>(); in RunImpl() 154 for (auto bb : GetGraph()->GetBlocksRPO()) { in RunImpl() 159 for (auto bb : GetGraph()->GetBlocksRPO()) { in RunImpl()
|