Home
last modified time | relevance | path

Searched refs:DestBB (Results 1 – 25 of 33) sorted by relevance

12

/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DBreakCriticalEdges.cpp118 BasicBlock *DestBB = TI->getSuccessor(SuccNum); in SplitKnownCriticalEdge() local
122 if (DestBB->isEHPad()) return nullptr; in SplitKnownCriticalEdge()
145 for (BasicBlock *P : predecessors(DestBB)) { in SplitKnownCriticalEdge()
176 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB); in SplitKnownCriticalEdge()
213 if (TI->getSuccessor(i) != DestBB) continue; in SplitKnownCriticalEdge()
229 DestBB, NewBB, {TIBB}, Options.MergeIdenticalEdges); in SplitKnownCriticalEdge()
247 if (!llvm::is_contained(successors(TIBB), DestBB)) in SplitKnownCriticalEdge()
261 if (Loop *DestLoop = LI->getLoopFor(DestBB)) { in SplitKnownCriticalEdge()
276 assert(DestLoop->getHeader() == DestBB && in SplitKnownCriticalEdge()
285 if (!TIL->contains(DestBB)) { in SplitKnownCriticalEdge()
[all …]
H A DLocal.cpp346 BasicBlock *DestBB = IBI->getDestination(i); in ConstantFoldTerminator() local
347 if (DTU && DestBB != TheOnlyDest) in ConstantFoldTerminator()
348 RemovedSuccessors.insert(DestBB); in ConstantFoldTerminator()
352 DestBB->removePredecessor(BB); in ConstantFoldTerminator()
760 BasicBlock *PredBB = DestBB->getSinglePredecessor(); in MergeBasicBlockIntoOnlyPred()
787 if (DestBB->hasAddressTaken()) { in MergeBasicBlockIntoOnlyPred()
788 BlockAddress *BA = BlockAddress::get(DestBB); in MergeBasicBlockIntoOnlyPred()
797 PredBB->replaceAllUsesWith(DestBB); in MergeBasicBlockIntoOnlyPred()
801 DestBB->getInstList().splice(DestBB->begin(), PredBB->getInstList()); in MergeBasicBlockIntoOnlyPred()
807 DestBB->moveAfter(PredBB); in MergeBasicBlockIntoOnlyPred()
[all …]
H A DBasicBlockUtils.cpp566 void llvm::updatePhiNodes(BasicBlock *DestBB, BasicBlock *OldPred, in updatePhiNodes() argument
569 for (PHINode &PN : DestBB->phis()) { in updatePhiNodes()
737 BasicBlock *SplitBB, BasicBlock *DestBB) { in createPHIsForSplitLoopExit() argument
744 for (PHINode &PN : DestBB->phis()) { in createPHIsForSplitLoopExit()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DBranchRelaxation.cpp243 OrigBB->addSuccessor(DestBB); in splitBlockBeforeInstr()
436 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in fixupUnconditionalBranch() local
459 BranchBB->addSuccessor(DestBB); in fixupUnconditionalBranch()
460 MBB->replaceSuccessor(DestBB, BranchBB); in fixupUnconditionalBranch()
483 assert(!DestBB->isEntryBlock()); in fixupUnconditionalBranch()
486 assert(FT == DestBB); in fixupUnconditionalBranch()
494 RestoreBB->addSuccessor(DestBB); in fixupUnconditionalBranch()
495 BranchBB->replaceSuccessor(DestBB, RestoreBB); in fixupUnconditionalBranch()
530 if (!isBlockInRange(*Last, *DestBB)) { in relaxBranchInstructions()
554 if (!isBlockInRange(MI, *DestBB)) { in relaxBranchInstructions()
[all …]
H A DModuloSchedule.cpp1622 auto InsertPt = DestBB->getFirstNonPHI(); in moveStageBetweenBlocks()
1635 MachineInstr *NI = BuildMI(*DestBB, DestBB->getFirstNonPHI(), in moveStageBetweenBlocks()
1639 BlockMIs[{DestBB, CanonicalMIs[&MI]}] = NI; in moveStageBetweenBlocks()
1647 DestBB->insert(InsertPt, &MI); in moveStageBetweenBlocks()
1649 BlockMIs[{DestBB, KernelMI}] = &MI; in moveStageBetweenBlocks()
1653 for (MachineInstr &MI : DestBB->phis()) { in moveStageBetweenBlocks()
1668 InsertPt = DestBB->getFirstNonPHI(); in moveStageBetweenBlocks()
1673 DestBB->insert(InsertPt, NewMI); in moveStageBetweenBlocks()
1678 NewMI->getOperand(2).setMBB(*DestBB->pred_begin()); in moveStageBetweenBlocks()
1681 BlockMIs[{DestBB, CanonicalMIs[Phi]}] = NewMI; in moveStageBetweenBlocks()
[all …]
H A DCodeGenPrepare.cpp763 if (DestBB == BB) in findDestBlockOfMergeableEmptyBlock()
766 if (!canMergeBlocks(BB, DestBB)) in findDestBlockOfMergeableEmptyBlock()
767 DestBB = nullptr; in findDestBlockOfMergeableEmptyBlock()
769 return DestBB; in findDestBlockOfMergeableEmptyBlock()
799 if (!DestBB || in eliminateMostlyEmptyBlocks()
859 if (!isa<PHINode>(DestBB->begin())) in isMergingEmptyBlockProfitable()
911 if (UI->getParent() == DestBB) { in canMergeBlocks()
968 << *BB << *DestBB); in eliminateMostlyEmptyBlock()
973 if (SinglePred != DestBB) { in eliminateMostlyEmptyBlock()
987 for (PHINode &PN : DestBB->phis()) { in eliminateMostlyEmptyBlock()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/ObjCARC/
H A DObjCARC.cpp77 BasicBlock *DestBB = I->getNormalDest(); in insertAfterInvokes() local
79 if (!DestBB->getSinglePredecessor()) { in insertAfterInvokes()
80 assert(I->getSuccessor(0) == DestBB && in insertAfterInvokes()
82 DestBB = SplitCriticalEdge(I, 0, CriticalEdgeSplittingOptions(DT)); in insertAfterInvokes()
88 insertRVCall(&*DestBB->getFirstInsertionPt(), I); in insertAfterInvokes()
/llvm-project-15.0.7/llvm/lib/Target/MSP430/
H A DMSP430BranchSelector.cpp128 MachineBasicBlock *DestBB = MI->getOperand(0).getMBB(); in expandBranches() local
133 BlockOffsets[DestBB->getNumber()] - BlockOffsets[MBB->getNumber()]; in expandBranches()
142 << printMBBReference(*DestBB) << ", Distance " in expandBranches()
161 if (Succ == DestBB) { in expandBranches()
204 MI = BuildMI(*MBB, MI, dl, TII->get(MSP430::Bi)).addMBB(DestBB); in expandBranches()
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DCFGMST.h221 if (Ei->DestBB && Ei->DestBB->isLandingPad()) { in computeMinimumSpanningTree()
222 if (unionGroups(Ei->SrcBB, Ei->DestBB)) in computeMinimumSpanningTree()
235 if (unionGroups(Ei->SrcBB, Ei->DestBB)) in computeMinimumSpanningTree()
256 << getBBInfo(EI->DestBB).Index << EI->infoString() << "\n"; in dumpEdges()
H A DPGOInstrumentation.cpp449 const BasicBlock *DestBB; member
456 : SrcBB(Src), DestBB(Dest), Weight(W) {} in PGOEdge()
726 const BasicBlock *DestBB = E->DestBB; in getInstrumentBBs() local
728 BBInfo &DestInfo = getBBInfo(DestBB); in getInstrumentBBs()
742 BasicBlock *DestBB = const_cast<BasicBlock *>(E->DestBB); in getInstrBB() local
745 return DestBB; in getInstrBB()
746 if (DestBB == nullptr) in getInstrBB()
763 return canInstrument(DestBB); in getInstrBB()
1166 const BasicBlock *DestBB = E->DestBB; in setInstrumentedCounts() local
1408 const BasicBlock *DestBB = E->DestBB; in setBranchWeights() local
[all …]
H A DGCOVProfiling.cpp181 const BasicBlock *DestBB; member
190 : SrcBB(Src), DestBB(Dest), Weight(W) {} in Edge()
708 BasicBlock *DestBB = const_cast<BasicBlock *>(E.DestBB); in getInstrBB() local
711 return DestBB; in getInstrBB()
712 if (DestBB == nullptr) in getInstrBB()
729 return CanInstrument(DestBB); in getInstrBB()
733 const unsigned SuccNum = GetSuccessorNumber(SrcBB, DestBB); in getInstrBB()
740 MST.addEdge(InstrBB, DestBB, 0).InMST = true; in getInstrBB()
751 GCOVBlock &Dst = E.DestBB ? GF.getBlock(E.DestBB) : GF.getReturnBlock(); in dumpEdges()
846 E.DestBB ? Func.getBlock(E.DestBB) : Func.getReturnBlock(); in emitProfileNotes()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DARMBasicBlockInfo.cpp94 MachineBasicBlock *DestBB, in isBBInRange() argument
98 unsigned DestOffset = BBInfo[DestBB->getNumber()].Offset; in isBBInRange()
100 LLVM_DEBUG(dbgs() << "Branch of destination " << printMBBReference(*DestBB) in isBBInRange()
H A DARMConstantIslandPass.cpp1693 MachineBasicBlock *DestBB = MI->getOperand(0).getMBB(); in fixupImmediateBr() local
1696 if (BBUtils->isBBInRange(MI, DestBB, Br.MaxDisp)) in fixupImmediateBr()
1737 MachineBasicBlock *DestBB = MI->getOperand(0).getMBB(); in fixupConditionalBr() local
1773 BMI->getOperand(0).setMBB(DestBB); in fixupConditionalBr()
1791 MBB->addSuccessor(DestBB); in fixupConditionalBr()
1810 .addMBB(DestBB) in fixupConditionalBr()
1901 if (BBUtils->isBBInRange(Br.MI, DestBB, MaxOffs)) { in optimizeThumb2Branches()
1966 !BBUtils->isBBInRange(Br.MI, DestBB, 4094)) in optimizeThumb2Branches()
1969 if (!DT->dominates(DestBB, MBB)) in optimizeThumb2Branches()
2002 DestBB = ExitBB; in optimizeThumb2Branches()
[all …]
H A DARMBasicBlockInfo.h144 bool isBBInRange(MachineInstr *MI, MachineBasicBlock *DestBB,
H A DARMLowOverheadLoops.cpp1428 MachineBasicBlock *DestBB = getWhileLoopStartTargetBB(*MI); in RevertWhile() local
1429 unsigned BrOpc = BBUtils->isBBInRange(MI, DestBB, 254) ? in RevertWhile()
1463 MachineBasicBlock *DestBB = MI->getOperand(1).getMBB(); in RevertLoopEnd() local
1464 unsigned BrOpc = BBUtils->isBBInRange(MI, DestBB, 254) ? in RevertLoopEnd()
1486 MachineBasicBlock *DestBB = MI->getOperand(2).getMBB(); in RevertLoopEndDec() local
1488 BBUtils->isBBInRange(MI, DestBB, 254) ? ARM::tBcc : ARM::t2Bcc; in RevertLoopEndDec()
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/
H A DWebAssemblyMachineFunctionInfo.cpp146 auto *DestBB = KV.second.get<MachineBasicBlock *>(); in WebAssemblyFunctionInfo() local
147 if (MBBs.count(SrcBB) && MBBs.count(DestBB)) in WebAssemblyFunctionInfo()
148 SrcToUnwindDest[SrcBB->getNumber()] = DestBB->getNumber(); in WebAssemblyFunctionInfo()
/llvm-project-15.0.7/llvm/lib/Target/Mips/
H A DMipsConstantIslandPass.cpp1453 (MachineInstr *MI,MachineBasicBlock *DestBB, unsigned MaxDisp) { in isBBInRange() argument
1456 unsigned DestOffset = BBInfo[DestBB->getNumber()].Offset; in isBBInRange()
1480 MachineBasicBlock *DestBB = MI->getOperand(TargetOperand).getMBB(); in fixupImmediateBr() local
1483 if (isBBInRange(MI, DestBB, Br.MaxDisp)) in fixupImmediateBr()
1499 MachineBasicBlock *DestBB = MI->getOperand(0).getMBB(); in fixupUnconditionalBr() local
1502 if (isBBInRange(MI, DestBB, BimmX16MaxDisp)) { in fixupUnconditionalBr()
1518 DestBB->setAlignment(Align(4)); in fixupUnconditionalBr()
1539 MachineBasicBlock *DestBB = MI->getOperand(TargetOperand).getMBB(); in fixupConditionalBr() local
1545 if (isBBInRange(MI, DestBB, LongFormMaxOff)) { in fixupConditionalBr()
1586 BMI->getOperand(BMITargetOperand).setMBB(DestBB); in fixupConditionalBr()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/CSKY/
H A DCSKYConstantIslandPass.cpp1216 MachineBasicBlock *DestBB, in isBBInRange() argument
1219 unsigned DestOffset = BBInfo[DestBB->getNumber()].Offset; in isBBInRange()
1221 LLVM_DEBUG(dbgs() << "Branch of destination " << printMBBReference(*DestBB) in isBBInRange()
1242 MachineBasicBlock *DestBB = TII->getBranchDestBlock(*MI); in fixupImmediateBr() local
1245 if (isBBInRange(MI, DestBB, Br.MaxDisp)) in fixupImmediateBr()
1281 MachineBasicBlock *DestBB = TII->getBranchDestBlock(*MI); in fixupConditionalBr() local
1319 BMI->getOperand(BMI->getNumExplicitOperands() - 1).setMBB(DestBB); in fixupConditionalBr()
1339 MBB->addSuccessor(DestBB); in fixupConditionalBr()
1340 std::next(MBB->getIterator())->removeSuccessor(DestBB); in fixupConditionalBr()
1344 LLVM_DEBUG(dbgs() << " Insert B to " << printMBBReference(*DestBB) in fixupConditionalBr()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DGVNHoist.cpp507 BasicBlock *DestBB, bool MoveAccess);
1049 Instruction *Repl, BasicBlock *DestBB, in removeAndReplace() argument
1055 MSSAUpdater->moveToPlace(NewMemAcc, DestBB, MemorySSA::BeforeTerminator); in removeAndReplace()
1106 BasicBlock *DestBB = HP.first; in hoist() local
1110 if (I->getParent() == DestBB) in hoist()
1122 assert(allOperandsAvailable(Repl, DestBB) && in hoist()
1133 if (!allOperandsAvailable(Repl, DestBB)) { in hoist()
1140 if (!makeGepOperandsAvailable(Repl, DestBB, InstructionsToHoist)) in hoist()
1145 Instruction *Last = DestBB->getTerminator(); in hoist()
1154 NR += removeAndReplace(InstructionsToHoist, Repl, DestBB, MoveAccess); in hoist()
H A DJumpThreading.cpp1656 BasicBlock *DestBB; in processThreadableEdges() local
1658 DestBB = nullptr; in processThreadableEdges()
1661 DestBB = BI->getSuccessor(cast<ConstantInt>(Val)->isZero()); in processThreadableEdges()
1664 DestBB = SI->findCaseValue(cast<ConstantInt>(Val))->getCaseSuccessor(); in processThreadableEdges()
1669 DestBB = cast<BlockAddress>(Val)->getBasicBlock(); in processThreadableEdges()
1674 OnlyDest = DestBB; in processThreadableEdges()
1677 if (OnlyDest != DestBB) in processThreadableEdges()
1690 PredToDestList.emplace_back(Pred, DestBB); in processThreadableEdges()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/
H A DBasicBlockUtils.h193 BasicBlock *SplitBB, BasicBlock *DestBB);
258 void updatePhiNodes(BasicBlock *DestBB, BasicBlock *OldPred,
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp1457 BasicBlock *DestBB = StoreBB->getTerminator()->getSuccessor(0); in mergeStoreIntoSuccessor() local
1458 if (!DestBB->hasNPredecessors(2)) in mergeStoreIntoSuccessor()
1462 pred_iterator PredIter = pred_begin(DestBB); in mergeStoreIntoSuccessor()
1469 if (StoreBB == DestBB || OtherBB == DestBB) in mergeStoreIntoSuccessor()
1539 MergedVal = InsertNewInstBefore(PN, DestBB->front()); in mergeStoreIntoSuccessor()
1544 BBI = DestBB->getFirstInsertionPt(); in mergeStoreIntoSuccessor()
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/
H A DModuloSchedule.h340 void moveStageBetweenBlocks(MachineBasicBlock *DestBB,
H A DTargetInstrInfo.h714 MachineBasicBlock *DestBB,
717 return insertBranch(MBB, DestBB, nullptr, ArrayRef<MachineOperand>(), DL,
/llvm-project-15.0.7/llvm/lib/AsmParser/
H A DLLParser.cpp6298 BasicBlock *DestBB; in parseSwitch() local
6340 BasicBlock *DestBB; in parseIndirectBr() local
6343 DestList.push_back(DestBB); in parseIndirectBr()
6348 DestList.push_back(DestBB); in parseIndirectBr()
6572 BasicBlock *DestBB; in parseCatchSwitch() local
6575 Table.push_back(DestBB); in parseCatchSwitch()
6595 for (BasicBlock *DestBB : Table) in parseCatchSwitch()
6596 CatchSwitch->addHandler(DestBB); in parseCatchSwitch()
6703 BasicBlock *DestBB; in parseCallBr() local
6706 IndirectDests.push_back(DestBB); in parseCallBr()
[all …]

12