Lines Matching full:latch
53 "a better latch exit"));
210 // Assuming both header and latch are exiting, look for a phi which is only
232 // Check that latch exit is deoptimizing (which means - very unlikely to happen)
234 // If we rotate latch to that exit our loop has a better chance of being fully
239 BasicBlock *Latch = L->getLoopLatch(); in canRotateDeoptimizingLatchExit() local
240 assert(Latch && "need latch"); in canRotateDeoptimizingLatchExit()
241 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator()); in canRotateDeoptimizingLatchExit()
242 // Need normal exiting latch. in canRotateDeoptimizingLatchExit()
250 // Latch exit is non-deoptimizing, no need to rotate. in canRotateDeoptimizingLatchExit()
405 /// \param SimplifiedLatch is true if the latch was just folded into the final
406 /// loop exit. In this case we may want to rotate even though the new latch is
407 /// now an exiting branch. This rotation would have happened had the latch not
409 /// rotating loops in which the latch exits to avoid excessive or endless
411 /// form. This property is satisfied because simplifying the loop latch can only
436 // If the loop latch already contains a branch that leaves the loop then the in rotateLoop()
441 // Rotate if either the loop latch does *not* exit the loop, or if the loop in rotateLoop()
442 // latch was just simplified. Or if we think it will be profitable. in rotateLoop()
720 // Original: OrigPre { OrigHeader NewHeader ... Latch } in rotateLoop()
721 // after: (OrigPre+OrigHeader') { NewHeader ... Latch OrigHeader } in rotateLoop()
817 assert(L->getHeader() == NewHeader && "Latch block is our new header"); in rotateLoop()
884 "Despite splitting all preds, failed to split latch exit?"); in rotateLoop()
903 assert(L->getLoopLatch() && "Invalid loop latch after loop rotation"); in rotateLoop()
928 // Check that new latch is a deoptimizing exit and then repeat rotation if possible. in rotateLoop()
929 // Deoptimizing latch exit is not a generally typical case, so we just loop over. in rotateLoop()
1016 BasicBlock *Latch = L->getLoopLatch(); in simplifyLoopLatch() local
1017 if (!Latch || Latch->hasAddressTaken()) in simplifyLoopLatch()
1020 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch()
1024 BasicBlock *LastExit = Latch->getSinglePredecessor(); in simplifyLoopLatch()
1032 if (!shouldSpeculateInstrs(Latch->begin(), Jmp->getIterator(), L)) in simplifyLoopLatch()
1035 LLVM_DEBUG(dbgs() << "Folding loop latch " << Latch->getName() << " into " in simplifyLoopLatch()
1039 MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr, in simplifyLoopLatch()
1060 // Simplify the loop latch before attempting to rotate the header in processLoop()
1068 "Loop latch should be exiting after loop-rotate."); in processLoop()