Lines Matching full:latch

92   // The latch must either be the only exiting block or all non-latch exit  in canPeel()
97 // note that LoopPeeling currently can only update the branch weights of latch in canPeel()
284 // All non-latch exit blocks must have an UnreachableInst terminator. in peelToTurnInvariantLoadsDerefencebale()
293 // Now look for invariant loads that dominate the latch and are not known to in peelToTurnInvariantLoadsDerefencebale()
299 BasicBlock *Latch = L.getLoopLatch(); in peelToTurnInvariantLoadsDerefencebale() local
318 if (DT.dominates(BB, Latch) && L.isLoopInvariant(Ptr) && in peelToTurnInvariantLoadsDerefencebale()
517 BasicBlock *Latch = L->getLoopLatch(); in violatesLegacyMultiExitLoopCheck() local
518 if (!Latch) in violatesLegacyMultiExitLoopCheck()
521 BranchInst *LatchBR = dyn_cast<BranchInst>(Latch->getTerminator()); in violatesLegacyMultiExitLoopCheck()
522 if (!LatchBR || LatchBR->getNumSuccessors() != 2 || !L->isLoopExiting(Latch)) in violatesLegacyMultiExitLoopCheck()
527 "At least one edge out of the latch must go to the header"); in violatesLegacyMultiExitLoopCheck()
686 // Don't set the probability of taking the edge from latch to loop header in updateBranchWeights()
758 BasicBlock *Latch = L->getLoopLatch(); in cloneLoopBlocks() local
813 // Similarly, for the latch: in cloneLoopBlocks()
818 BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]); in cloneLoopBlocks()
841 Value *LatchVal = NewPHI->getIncomingValueForBlock(Latch); in cloneLoopBlocks()
853 // values are adjusted, since the value going out of the latch may also be in cloneLoopBlocks()
927 BasicBlock *Latch = L->getLoopLatch(); in peelLoop() local
946 // nearest common dominator of the previous idom and the first latch, in peelLoop()
948 BasicBlock *NewIDom = DT.findNearestCommonDominator(BB, Latch); in peelLoop()
1011 cast<Instruction>(cast<BasicBlock>(Latch)->getTerminator()); in peelLoop()
1050 // Remove Loop metadata from the latch branch instruction in peelLoop()
1051 // because it is not the Loop's latch branch anymore. in peelLoop()
1067 Value *NewVal = PHI->getIncomingValueForBlock(Latch); in peelLoop()