Lines Matching refs:Latch
554 BasicBlock *Latch = L->getLoopLatch(); in simplifyLoopLatch() local
555 if (!Latch || Latch->hasAddressTaken()) in simplifyLoopLatch()
558 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch()
562 BasicBlock *LastExit = Latch->getSinglePredecessor(); in simplifyLoopLatch()
570 if (!shouldSpeculateInstrs(Latch->begin(), Jmp->getIterator(), L)) in simplifyLoopLatch()
573 DEBUG(dbgs() << "Folding loop latch " << Latch->getName() << " into " in simplifyLoopLatch()
577 LastExit->getInstList().splice(BI->getIterator(), Latch->getInstList(), in simplifyLoopLatch()
578 Latch->begin(), Jmp->getIterator()); in simplifyLoopLatch()
580 unsigned FallThruPath = BI->getSuccessor(0) == Latch ? 0 : 1; in simplifyLoopLatch()
586 Latch->replaceSuccessorsPhiUsesWith(LastExit); in simplifyLoopLatch()
590 assert(Latch->empty() && "unable to evacuate Latch"); in simplifyLoopLatch()
591 LI->removeBlock(Latch); in simplifyLoopLatch()
593 DT->eraseNode(Latch); in simplifyLoopLatch()
594 Latch->eraseFromParent(); in simplifyLoopLatch()