/arkcompiler/runtime_core/compiler/optimizer/optimizations/ |
D | lowering.cpp | 42 auto in0 = cmp->GetInput(0).GetInst(); in BetterToSwapCompareInputs() 43 auto in1 = cmp->GetInput(1).GetInst(); in BetterToSwapCompareInputs() 64 compiler::Inst *input_0 = if_inst->GetInput(0).GetInst(); in OptimizeIfInput() 65 compiler::Inst *input_1 = if_inst->GetInput(1).GetInst(); in OptimizeIfInput() 86 auto input = inst->GetInput(0).GetInst(); in LowerIf() 92 if (user.GetInst()->GetOpcode() != Opcode::IfImm) { in LowerIf() 99 auto in0 = input->GetInput(0).GetInst(); in LowerIf() 100 auto in1 = input->GetInput(1).GetInst(); in LowerIf() 108 auto cst = input->GetInput(1).GetInst(); in LowerIf() 125 replace->SetInput(0, input->GetInput(0).GetInst()); in LowerIf() [all …]
|
D | cleanup.cpp | 124 auto user = user_item.GetInst(); in RunOnce() 157 auto inst_pred = phi->GetInput(index_pred).GetInst(); in CheckSpecialTriangle() 158 auto inst_bb = phi->GetInput(index_bb).GetInst(); in CheckSpecialTriangle() 162 inst_bb = inst_bb->CastToPhi()->GetInput(i).GetInst(); in CheckSpecialTriangle() 220 auto remaining_inst = phi->GetInputs()[1 - rm_index].GetInst(); in ProcessBB() 255 inst = inst->GetInput(0).GetInst(); in MarkLiveRec() 259 MarkLiveRec(live_mrk, input.GetInst()); in MarkLiveRec() 309 auto input = input_item.GetInst(); in SetLiveRec() 335 auto user = user_item.GetInst(); in LiveUserSearchRec() 369 auto input = input_item.GetInst(); in Marking() [all …]
|
D | move_constants.cpp | 87 auto user_inst = user.GetInst(); in SingleBlockNoPhiDominatingUser() 118 auto inst = user.GetInst(); in GetDominators()
|
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/ |
D | phi_resolver.h | 63 auto input_inst = save_state->GetInput(idx).GetInst(); in Run() 103 auto input_type = input.GetInst()->GetType(); in SetTypeByInputs() 113 if (user.GetInst()->SetMarker(marker_)) { in FindUsersRec() 116 if (user.GetInst()->IsPhi() || user.GetInst()->GetOpcode() == Opcode::CatchPhi) { in FindUsersRec() 117 phi_users_.push_back(user.GetInst()); in FindUsersRec() 118 FindUsersRec(user.GetInst()); in FindUsersRec() 120 if (!user.GetInst()->IsSaveState()) { in FindUsersRec() 124 real_users_.push_back(user.GetInst()); in FindUsersRec() 139 auto input_inst = input.GetInst(); in FindInputsRec() 164 auto input_bb = phi_inst->GetInput(index).GetInst()->GetBasicBlock(); in CheckPhiInputs()
|
D | inst_builder.cpp | 172 if (input.GetInst()->IsMarked(GetNoTypeMarker())) { in SetTypeRec() 173 SetTypeRec(input.GetInst(), type); in SetTypeRec() 201 auto input_inst = save_state->GetInput(idx).GetInst(); in RemoveNotDominateInputs() 248 if (input.GetInst()->IsMarked(GetNoTypeMarker())) { in FixInstructions() 251 SetTypeRec(input.GetInst(), input_type); in FixInstructions() 302 auto user = (*curr_it).GetInst(); in SplitConstant() 330 if (!user.GetInst()->IsSaveState()) { in CleanupCatchPhis() 339 user.GetInst()->RemoveInput(user.GetIndex()); in CleanupCatchPhis()
|
/arkcompiler/runtime_core/bytecode_optimizer/ |
D | reg_acc_alloc.cpp | 59 compiler::Inst *input = inst->GetInput(AccReadIndex(inst)).GetInst(); in IsAccWriteBetween() 119 compiler::Inst *uinput = input.GetInst(); in CanUserReadAcc() 136 return user->GetInput(AccReadIndex(user)).GetInst() == inst || user->IsCommutative(); in CanUserReadAcc() 151 compiler::Inst *phi_input = input.GetInst(); in IsPhiAccReady() 159 compiler::Inst *uinst = user.GetInst(); in IsPhiAccReady() 235 compiler::Inst *uinst = user.GetInst(); in RunImpl() 251 compiler::Inst *uinst = user.GetInst(); in RunImpl() 269 compiler::Inst *input = inst->GetInput(AccReadIndex(inst)).GetInst(); in RunImpl() 278 compiler::Inst *uinst = user.GetInst(); in RunImpl()
|
D | codegen.cpp | 271 if (p(u.GetInst())) { in HasUserPredicate() 362 if (!cvat_inst->GetInput(0).GetInst()->IsConst()) { in IsEcmaConstTemplate() 365 auto const_inst = cvat_inst->GetInput(0).GetInst()->CastToConstant(); in IsEcmaConstTemplate() 391 auto test_lhs = IsEcmaConstTemplate(inst->GetInput(0).GetInst()); in IfEcma() 392 auto test_rhs = IsEcmaConstTemplate(inst->GetInput(1).GetInst()); in IfEcma() 491 auto test_arg = IsEcmaConstTemplate(inst->GetInput(0).GetInst()); in VisitReturn() 526 ASSERT(cvat->GetInput(0).GetInst()->IsConst()); in VisitCastValueToAnyType() 527 auto input = cvat->GetInput(0).GetInst()->CastToConstant(); in VisitCastValueToAnyType() 532 ASSERT(cvat->GetInput(0).GetInst()->IsConst()); in VisitCastValueToAnyType() 533 auto input = cvat->GetInput(0).GetInst()->CastToConstant(); in VisitCastValueToAnyType() [all …]
|
/arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/ |
D | reg_alloc_resolver.cpp | 146 return inst->GetFirstUser()->GetInst(); in GetFirstUserOrInst() 164 return inst->GetUsers().Front().GetInst(); in GetExplicitUser() 170 if (user.GetInst()->IsPhi()) { in GetExplicitUser() 173 ASSERT(user_inst != nullptr && user_inst->IsDominate(user.GetInst())); in GetExplicitUser() 206 if (test_user.GetInst()->GetId() == user->GetId()) { in FillSaveStateRootsMask() 209 auto explicit_test_user = GetExplicitUser(test_user.GetInst()); in FillSaveStateRootsMask() 293 auto first_input = catch_phi->GetInput(0).GetInst(); in SqueezeCatchPhiInputs() 295 if (catch_phi->GetInput(i).GetInst() != first_input) { in SqueezeCatchPhiInputs() 309 auto input_inst = catch_phi->GetInput(i).GetInst(); in SqueezeCatchPhiInputs() 314 auto saved_inst = new_catch_phi->GetInput(j).GetInst(); in SqueezeCatchPhiInputs()
|
D | reg_alloc_base.cpp | 163 auto type = interval->GetInst()->GetType(); in SetType() 169 auto inst = interval->GetInst(); in SetPreassignedRegisters() 203 [[maybe_unused]] auto inst = interval->GetInst(); in PrepareIntervals() 257 dst->GetInst()->GetBasicBlock()->GetGraph()->SetRegUsage(dst->GetReg(), dst->GetType()); in ConnectIntervals()
|
D | reg_alloc_graph_coloring.cpp | 103 …return !liveness->IsPhysical() && liveness->GetInst() == inst && liveness->GetSibling() == nullptr; in FindNode() 130 const auto *inst = interv->GetInst(); in PrecolorIG() 211 for (const auto &input : node->GetLifeIntervals()->GetInst()->GetInputs()) { in AddAffinityEdges() 213 if (const auto *anbr = FindNode(nodes, input.GetInst())) { in AddAffinityEdges() 215 << *anbr->GetLifeIntervals()->GetInst(); in AddAffinityEdges() 229 auto node_split = FindNode(ig->GetNodes(), interv->GetInst()); in AddAffinityEdgeToSibling() 232 << *node_split->GetLifeIntervals()->GetInst(); in AddAffinityEdgeToSibling()
|
D | split_resolver.cpp | 54 …<< "Connect siblings for inst v" << interval->GetInst()->GetId() << " at point: " << curr->GetBegi… in ConnectSiblings() 76 auto phi = interval->GetInst(); in ProcessBlock() 124 …COMPILER_LOG(DEBUG, SPLIT_RESOLVER) << "Resolve split move for inst v" << src_interval->GetInst()-… in ConnectSpiltFromPredBlock()
|
/arkcompiler/runtime_core/compiler/optimizer/ir/ |
D | graph_cloner.cpp | 192 auto user = user_it->GetInst(); in CreateResolverBlock() 217 auto compare = ifimm->GetInput(0).GetInst(); in SplitBackEdge() 222 new_cmp->SetInput(0, compare->GetInput(0).GetInst()); in SplitBackEdge() 223 new_cmp->SetInput(1, compare->GetInput(1).GetInst()); in SplitBackEdge() 306 auto input = compare->GetInput(i).GetInst(); in UpdateUsersAfterNoSideExitsUnroll() 316 auto user = user_it->GetInst(); in UpdateUsersAfterNoSideExitsUnroll() 454 auto inst = phi->GetInput(0).GetInst(); in BuildLoopUnrollDataFlow() 488 … unroll_data->phi_replaced_inputs->emplace(phi, phi->GetInput(phi_update_input_idx).GetInst()); in BuildLoopUnrollDataFlow() 519 auto remaining_inst = phi->GetInput(0).GetInst(); in RemoveLoopBackEdge() 541 auto user = user_it->GetInst(); in BuildClonedLoopHeaderDataFlow() [all …]
|
D | graph_checker.cpp | 56 [[maybe_unused]] auto user_inst = user.GetInst(); in UserInputCheck() 63 [[maybe_unused]] auto input_inst = input.GetInst(); in UserInputCheck() 71 [](Input input) { return input.GetInst()->IsSaveState(); }); in UserInputCheck() 76 ASSERT(it->GetInst() == inst->GetSaveState()); in UserInputCheck() 208 auto user_inst = user.GetInst(); in CheckDataFlow() 236 …ASSERT_DO(CheckInstHasUser(input.GetInst(), inst), std::cerr << "Instruction is not a user to its … in CheckDataFlow() 237 … << "input: " << *input.GetInst() << std::endl in CheckDataFlow() 512 if (node.GetInst() == input) { in CheckInstHasInput() 525 if (node.GetInst() == user) { in CheckInstHasUser() 653 skip_flag &= IsObjectCheckDisabledForOpcode(input.GetInst()); in CheckSaveStateInputs() [all …]
|
D | inst.h | 343 Inst *GetInst() in GetInst() function 347 const Inst *GetInst() const in GetInst() function 381 Inst *GetInst(); 382 const Inst *GetInst() const in GetInst() function 384 return const_cast<User *>(this)->GetInst(); in GetInst() 556 return lhs.GetInst() == rhs.GetInst(); 910 return GetDataFlowInput(GetInput(index).GetInst()); in GetDataFlowInput() 933 auto ss = GetInput(GetInputsCount() - 1).GetInst(); in GetSaveState() 1007 ASSERT(user && user->GetInst()); in AddUser() 1042 if (input.GetInst() != nullptr && input.GetInst()->HasUsers()) { in SetInput() [all …]
|
D | inst.cpp | 30 Inst *User::GetInst() in GetInst() function in panda::compiler::User 81 …Inst *old_input = old_inputs[i].GetInst(); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithme… in Reallocate() 121 auto *curr_input = GetInput(index)->GetInst(); in Remove() 130 auto *last_input = GetInput(size_)->GetInst(); in Remove() 189 return GetInput(index).GetInst(); in GetPhiInput() 214 input_inst = input_inst->GetInput(input_idx).GetInst(); in SkipInstructions()
|
D | dump.cpp | 100 auto user = node_inst.GetInst(); in DumpUsers() 192 Inst *input = node_inst.GetInst(); in DumpInputs() 206 (*out) << sep << std::dec << InstId(GetInput(i).GetInst(), allocator); in DumpInputs() 240 Inst *input = GetInput(idx).GetInst(); in DumpInputs()
|
/arkcompiler/runtime_core/libark_defect_scan_aux/ |
D | graph.cpp | 93 if (!input.GetInst()->IsSaveState()) { in GetInputInsts() 94 inputs.emplace_back(input.GetInst()); in GetInputInsts() 105 if (!user.GetInst()->IsSaveState()) { in GetUserInsts() 106 users.emplace_back(user.GetInst()); in GetUserInsts()
|
/arkcompiler/runtime_core/compiler/tests/ |
D | inst_test.cpp | 22 return lhs.GetInst() == rhs; in operator ==() 113 user.GetInst()->SetId(user.GetInst()->GetId()); in TEST_F() 118 INS(3).ReplaceUsers(INS(3).GetInput(0).GetInst()); in TEST_F() 120 ASSERT_TRUE(INS(6).GetInput(0).GetInst() == &INS(0)); in TEST_F() 121 ASSERT_TRUE(INS(3).GetInput(0).GetInst() == nullptr); in TEST_F() 527 ASSERT_EQ(init_inputs[idx].GetInst(), curr_inputs[idx].GetInst()); in TEST_F() 530 ASSERT_EQ(init_inputs.rbegin()->GetInst(), curr_inputs[idx].GetInst()); in TEST_F() 551 auto user = graph->FindOrCreateConstant(i)->GetUsers().begin()->GetInst(); in TEST_F()
|
D | branch_elimination_test.cpp | 67 EXPECT_TRUE(input.GetInst() == nullptr); in CheckBlocksDisconnected() 231 EXPECT_EQ(INS(18).GetInput(0).GetInst(), &INS(6)); in TEST_F() 244 EXPECT_EQ(INS(12).GetUsers().Front().GetInst(), phi); in TEST_F() 245 EXPECT_EQ(INS(15).GetUsers().Front().GetInst(), phi); in TEST_F() 278 EXPECT_EQ(INS(12).GetUsers().Front().GetInst(), phi); in TEST_F() 279 EXPECT_EQ(INS(15).GetUsers().Front().GetInst(), phi); in TEST_F() 290 EXPECT_EQ(INS(18).GetInput(0).GetInst(), &INS(6)); in TEST_F() 323 EXPECT_EQ(INS(6).GetUsers().Front().GetInst(), phi); in TEST_F() 324 EXPECT_EQ(INS(12).GetUsers().Front().GetInst(), phi); in TEST_F() 357 EXPECT_EQ(INS(6).GetUsers().Front().GetInst(), phi); in TEST_F() [all …]
|
D | unit_test.h | 161 if (it->GetInst() != &INS(*it2)) { in CheckInputs() 174 EXPECT_EQ(user.GetInst()->GetInput(user.GetIndex()).GetInst(), &inst); in CheckUsers() 175 if (users_map[user.GetInst()->GetId()]-- == 0) in CheckUsers()
|
D | graph_comparator.h | 92 …ambda = [this](Input input1, Input input2) { return Compare(input1.GetInst(), input2.GetInst()); }; in Compare() 103 auto input1 = inst1->GetInput(index1).GetInst(); in Compare() 239 … if (inst1->GetOpcode() == Opcode::Cmp && IsFloatType(inst1->GetInput(0).GetInst()->GetType())) { in Compare()
|
/arkcompiler/runtime_core/compiler/optimizer/templates/ |
D | inst_checker_gen.h.erb | 37 return inst->GetInput(input).GetInst()->GetType(); 61 ASSERT(inst->GetInput(<%= i %>).GetInst()->IsSaveState());
|
/arkcompiler/runtime_core/compiler/optimizer/analysis/ |
D | liveness_analyzer.cpp | 299 if (live_set->IsSet(interval->GetInst()->GetLinearNumber())) { in ProcessBlockLiveInstructions() 335 if (live_set->IsSet(interval->GetInst()->GetLinearNumber())) { in ProcessBlockLiveInstructions() 362 auto input_inst = inst->GetDataFlowInput(input.GetInst()); in AdjustInputsLifetime() 373 auto input_inst = save_state->GetDataFlowInput(ss_input.GetInst()); in AdjustInputsLifetime() 590 auto split_child = alloc->New<LifeIntervals>(alloc, GetInst()); in SplitAt()
|
D | liveness_analyzer.h | 281 Inst *GetInst() const in GetInst() function 358 ss << " {inst v" << std::to_string(GetInst()->GetId()) << "}"; in ToString() 511 auto li_inst = li->GetInst(); in EnumerateLiveIntervalsForInst()
|
/arkcompiler/runtime_core/bytecode_optimizer/tests/ |
D | common.h | 339 … [this](Input input1, Input input2) { return Compare(input1.GetInst(), input2.GetInst()); })) { in Compare() 347 … [this, &input1](Input input2) { return Compare(input1.GetInst(), input2.GetInst()); }); in Compare() 401 … if (inst1->GetOpcode() == Opcode::Cmp && IsFloatType(inst1->GetInput(0).GetInst()->GetType())) { in Compare()
|