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();
240 assert(Latch && "need latch");
241 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator());
242 // Need normal exiting latch.
250 // Latch exit is non-deoptimizing, no need to rotate.
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
441 // Rotate if either the loop latch does *not* exit the loop, or if the loop
442 // latch was just simplified. Or if we think it will be profitable.
720 // Original: OrigPre { OrigHeader NewHeader ... Latch }
721 // after: (OrigPre+OrigHeader') { NewHeader ... Latch OrigHeader }
817 assert(L->getHeader() == NewHeader && "Latch block is our new header");
884 "Despite splitting all preds, failed to split latch exit?");
903 assert(L->getLoopLatch() && "Invalid loop latch after loop rotation");
928 // Check that new latch is a deoptimizing exit and then repeat rotation if possible.
929 // Deoptimizing latch exit is not a generally typical case, so we just loop over.
1016 BasicBlock *Latch = L->getLoopLatch();
1017 if (!Latch || Latch->hasAddressTaken())
1020 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator());
1024 BasicBlock *LastExit = Latch->getSinglePredecessor();
1032 if (!shouldSpeculateInstrs(Latch->begin(), Jmp->getIterator(), L))
1035 LLVM_DEBUG(dbgs() << "Folding loop latch " << Latch->getName() << " into "
1039 MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr,
1060 // Simplify the loop latch before attempting to rotate the header
1068 "Loop latch should be exiting after loop-rotate.");