Searched refs:Latch (Results 1 - 25 of 26) sorted by relevance

12

/freebsd-11-stable/contrib/llvm-project/llvm/lib/CodeGen/
H A DMachineLoopInfo.cpp89 if (MachineBasicBlock *Latch = getLoopLatch()) {
90 if (isLoopExiting(Latch))
91 return Latch;
H A DHardwareLoops.cpp492 BasicBlock *Latch = ExitBranch->getParent(); local
496 Index->addIncoming(EltsRem, Latch);
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopFuse.cpp144 /// Latch of the loop
145 BasicBlock *Latch; member in struct:__anon2696::FusionCandidate
170 Latch(L->getLoopLatch()), L(L), Valid(true),
214 return Preheader && Header && ExitingBlock && ExitBlock && Latch && L &&
227 assert(Latch == L->getLoopLatch() && "Latch is out of sync");
274 << "\tLatch: " << (Latch ? Latch->getName() : "nullptr") << "\n"
295 if (!Latch)
1113 BranchInst *FCLatchBranch = dyn_cast<BranchInst>(FC.Latch
[all...]
H A DLoopUnrollAndJamPass.cpp289 BasicBlock *Latch = L->getLoopLatch();
294 if (Latch != Exit || SubLoopLatch != SubLoopExit)
374 unsigned OuterTripCount = SE.getSmallConstantTripCount(L, Latch);
375 unsigned OuterTripMultiple = SE.getSmallConstantTripMultiple(L, Latch);
H A DInductiveRangeCheckElimination.cpp448 BasicBlock *Latch = nullptr; member in struct:__anon2684::LoopStructure
450 // `Latch's terminator instruction is `LatchBr', and it's `LatchBrExitIdx'th
478 Result.Latch = cast<BasicBlock>(Map(Latch));
745 BasicBlock *Latch = L.getLoopLatch(); local
746 assert(Latch && "Simplified loops only have one latch!");
748 if (Latch->getTerminator()->getMetadata(ClonedLoopTag)) {
753 if (!L.isLoopExiting(Latch)) {
765 BranchInst *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator());
789 const SCEV *LatchCount = SE.getExitCount(&L, Latch);
[all...]
H A DLoopPredication.cpp1065 auto *Latch = L->getLoopLatch();
1066 if (!Latch)
1073 const SCEV *LatchEC = SE->getExitCount(L, Latch);
1170 assert(!Latch || DT->dominates(ExitingBB, Latch));
1223 LLVM_DEBUG(dbgs() << "Latch check:\n");
H A DLoopLoadElimination.cpp151 return llvm::all_of(Latches, [&](const BasicBlock *Latch) {
152 return DT->dominates(StoreBlock, Latch);
H A DLoopUnswitch.cpp1532 BasicBlock *Latch = L->getLoopLatch(); local
1538 if (Latch && DT->dominates(SISucc, Latch))
H A DSimpleLoopUnswitch.cpp2477 BasicBlock *Latch = L.getLoopLatch(); local
2479 if (DT.dominates(CondBlock, Latch) &&
2497 bool SkipExitingSuccessors = DT.dominates(CondBlock, Latch);
H A DLoopStrengthReduce.cpp2128 unsigned Entry, Latch; local
2131 Latch = 1;
2134 Latch = 0;
2144 dyn_cast<BinaryOperator>(PH->getIncomingValue(Latch));
2176 NewPH->addIncoming(NewIncr, PH->getIncomingBlock(Latch));
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnrollRuntime.cpp82 // Latch
84 BasicBlock *Latch = L->getLoopLatch(); local
85 assert(Latch && "Loop must have a latch");
86 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]);
93 for (BasicBlock *Succ : successors(Latch)) {
115 Value *V = PN.getIncomingValueForBlock(Latch);
188 BasicBlock *Latch = L->getLoopLatch(); local
189 assert(Latch && "Loop must have a latch");
190 BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]);
198 // Latch
308 BasicBlock *Latch = L->getLoopLatch(); local
565 BasicBlock *Latch = L->getLoopLatch(); local
[all...]
H A DLoopUnrollPeel.cpp87 // Latch's terminator is a conditional branch, Latch is exiting and
88 // all non Latch exits ends up with deoptimize.
89 const BasicBlock *Latch = L->getLoopLatch(); local
90 const BranchInst *T = dyn_cast<BranchInst>(Latch->getTerminator());
91 return T && T->isConditional() && L->isLoopExiting(Latch) &&
444 /// \param[out] ExitWeight The weight of the edge from Latch to Exit.
445 /// \param[out] FallThroughWeight The weight of the edge from Latch to Header.
457 /// Update the weights of original Latch block after peeling off all iterations.
461 /// \param ExitWeight The weight of the edge from Latch t
[all...]
H A DLoopRotationUtils.cpp427 assert(L->getHeader() == NewHeader && "Latch block is our new header");
605 BasicBlock *Latch = L->getLoopLatch(); local
606 if (!Latch || Latch->hasAddressTaken())
609 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator());
613 BasicBlock *LastExit = Latch->getSinglePredecessor();
621 if (!shouldSpeculateInstrs(Latch->begin(), Jmp->getIterator(), L))
624 LLVM_DEBUG(dbgs() << "Folding loop latch " << Latch->getName() << " into "
628 MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr,
H A DLoopUnrollAndJam.cpp82 // Looks at the phi nodes in Header for values coming from Latch. For these
91 static bool processHeaderPhiOperands(BasicBlock *Header, BasicBlock *Latch, argument
95 Value *V = Phi.getIncomingValueForBlock(Latch);
115 // Move the phi operands of Header from Latch out of AftBlocks to InsertLoc.
117 BasicBlock *Latch,
123 processHeaderPhiOperands(Header, Latch, AftBlocks,
734 BasicBlock *Latch = L->getLoopLatch(); local
740 if (Latch != Exit)
793 Header, Latch, AftBlocks, [&AftBlocks, &SubLoop](Instruction *I) {
116 moveHeaderPhiOperandsToForeBlocks(BasicBlock *Header, BasicBlock *Latch, Instruction *InsertLoc, BasicBlockSet &AftBlocks) argument
H A DLoopUtils.cpp696 BasicBlock *Latch = L->getLoopLatch(); local
697 if (!Latch)
699 BranchInst *LatchBR = dyn_cast<BranchInst>(Latch->getTerminator());
700 if (!LatchBR || LatchBR->getNumSuccessors() != 2 || !L->isLoopExiting(Latch))
H A DLoopUnroll.cpp168 /// PN = PHI [I, Latch], [CI, PreHeader]
174 /// PN = PHI [I2, Latch], [CI, PreHeader]
181 /// PN = PHI [I2, Latch], [NewPN, PreHeader]
410 assert(L->isLoopExiting(ExitingBlock) && "Latch is not exiting?");
876 for (BasicBlock *Latch : Latches) {
877 BranchInst *Term = dyn_cast<BranchInst>(Latch->getTerminator());
879 (CompletelyUnroll && !LatchIsExiting && Latch == Latches.back())) &&
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Support/
H A DParallel.h40 class Latch { class in namespace:llvm::parallel::detail
46 explicit Latch(uint32_t Count = 0) : Count(Count) {} function in class:llvm::parallel::detail::Latch
47 ~Latch() { sync(); }
67 Latch L;
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonHardwareLoops.cpp409 MachineBasicBlock *Latch = L->getLoopLatch(); local
411 if (!Header || !Preheader || !Latch || !ExitingBlock)
436 if (Phi->getOperand(i+1).getMBB() != Latch)
606 MachineBasicBlock *Latch = L->getLoopLatch(); local
611 else if (MBB == Latch)
628 if (ExitingBlock != Latch && (TB == Latch || FB == Latch)) {
631 bool NotAnalyzed = TII->analyzeBranch(*Latch, LTB, LFB, LCond, false);
634 if (TB == Latch)
1609 MachineBasicBlock *Latch = L->getLoopLatch(); local
1857 MachineBasicBlock *Latch = L->getLoopLatch(); local
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Analysis/
H A DIVDescriptors.cpp682 auto *Latch = TheLoop->getLoopLatch(); local
683 if (!Preheader || !Latch)
688 Phi->getBasicBlockIndex(Latch) < 0)
693 auto *Previous = dyn_cast<Instruction>(Phi->getIncomingValueForBlock(Latch));
968 BasicBlock *Latch = L->getLoopLatch(); local
969 if (!Latch)
971 Value *Val = PN->getIncomingValueForBlock(Latch);
1080 BasicBlock *Latch = AR->getLoop()->getLoopLatch(); local
1081 if (!Latch)
1084 dyn_cast<BinaryOperator>(Phi->getIncomingValueForBlock(Latch));
[all...]
H A DLoopInfo.cpp173 if (BasicBlock *Latch = L.getLoopLatch())
174 if (BranchInst *BI = dyn_cast_or_null<BranchInst>(Latch->getTerminator()))
231 BasicBlock *Latch = L.getLoopLatch();
232 assert(Latch && "Expecting valid latch");
234 BranchInst *BI = dyn_cast_or_null<BranchInst>(Latch->getTerminator());
H A DScalarEvolution.cpp4335 if (BasicBlock *Latch = L->getLoopLatch()) {
4336 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator());
6940 const BasicBlock *Latch = L->getLoopLatch();
6942 if (!Latch)
6951 assert(SE->DT.dominates(ENT.ExitingBlock, Latch) &&
7109 BasicBlock *Latch = L->getLoopLatch(); // may be NULL.
7154 if (EL.MaxNotTaken != getCouldNotCompute() && Latch &&
7155 DT.dominates(ExitBB, Latch)) {
7187 const BasicBlock *Latch = L->getLoopLatch();
7188 if (!Latch || !D
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DLoopInfoImpl.h124 const BlockT *Latch = getLoopLatch(); local
125 assert(Latch && "Latch block must exists");
127 [Latch](const BlockT *BB) { return BB != Latch; });
212 BlockT *Latch = nullptr; local
215 if (Latch)
217 Latch = Pred;
221 return Latch;
H A DLoopInfo.h279 /// Latch block are not considered. If the exit comes from Latch has also
280 /// non Latch predecessor in a loop it will be added to ExitBlocks.
745 /// br Latch
746 /// Latch:
766 BasicBlock *Latch = getLoopLatch(); local
767 return Latch && isLoopExiting(Latch);
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DLoopVectorizationLegality.cpp314 BasicBlock *Latch = Lp->getLoopLatch(); local
315 auto *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator());
331 Value *IVUpdate = IV->getIncomingValueForBlock(Latch);
H A DLoopVectorize.cpp2533 BasicBlock *Latch = L->getLoopLatch();
2536 if (!Latch)
2537 Latch = Header;
2544 Builder.SetInsertPoint(Latch->getTerminator());
2550 Induction->addIncoming(Next, Latch);
2556 Latch->getTerminator()->eraseFromParent();
3555 auto *Latch = OrigLoop->getLoopLatch();
3559 auto *Previous = Phi->getIncomingValueForBlock(Latch);
3744 BasicBlock *Latch = OrigLoop->getLoopLatch();
3745 Value *LoopVal = Phi->getIncomingValueForBlock(Latch);
[all...]

Completed in 219 milliseconds

12