Lines Matching full:latch

79 STATISTIC(InvalidLatch, "Loop has invalid latch");
158 /// Latch of the loop
159 BasicBlock *Latch; member
190 Latch(L->getLoopLatch()), L(L), Valid(true), in FusionCandidate()
235 return Preheader && Header && ExitingBlock && ExitBlock && Latch && L && in isValid()
248 assert(Latch == L->getLoopLatch() && "Latch is out of sync"); in verify()
270 Latch = L->getLoopLatch(); in updateAfterPeeling()
308 << "\tLatch: " << (Latch ? Latch->getName() : "nullptr") << "\n" in dump()
329 if (!Latch) in isEligibleForFusion()
1519 /// Modify the latch branch of FC to be unconditional since successors of the
1522 BranchInst *FCLatchBranch = dyn_cast<BranchInst>(FC.Latch->getTerminator()); in simplifyLatchBranch()
1533 /// Move instructions from FC0.Latch to FC1.Latch. If FC0.Latch has an unique
1534 /// successor, then merge FC0.Latch with its unique successor.
1536 moveInstructionsToTheBeginning(*FC0.Latch, *FC1.Latch, DT, PDT, DI); in mergeLatch()
1537 if (BasicBlock *Succ = FC0.Latch->getUniqueSuccessor()) { in mergeLatch()
1558 /// 2. The latch of \p FC0 is modified to jump to the header of \p FC1.
1559 /// 3. The latch of \p FC1 i modified to jump to the header of \p FC0.
1568 /// statement in the preheader to be fused. Similarly, the latch blocks of the
1600 // block is the latch block of the first loop. Nothing needs to be done in performFusion()
1601 // anyway as all loop carried values dominate the latch and thereby also the in performFusion()
1604 if (FC0.ExitingBlock != FC0.Latch) in performFusion()
1610 FC0.Latch->replaceSuccessorsPhiUsesWith(FC1.Latch); in performFusion()
1621 // the new values do only need to dominate their latch and not the exiting in performFusion()
1624 // value, if the second header was reached through an old latch of the in performFusion()
1677 int L1LatchBBIdx = LCPHI->getBasicBlockIndex(FC1.Latch); in performFusion()
1686 L1HeaderPHI->addIncoming(LCV, FC0.Latch); in performFusion()
1693 // Replace latch terminator destinations. in performFusion()
1694 FC0.Latch->getTerminator()->replaceUsesOfWith(FC0.Header, FC1.Header); in performFusion()
1695 FC1.Latch->getTerminator()->replaceUsesOfWith(FC1.Header, FC0.Header); in performFusion()
1697 // Modify the latch branch of FC0 to be unconditional as both successors of in performFusion()
1701 // If FC0.Latch and FC0.ExitingBlock are the same then we have already in performFusion()
1703 if (FC0.Latch != FC0.ExitingBlock) in performFusion()
1705 DominatorTree::Insert, FC0.Latch, FC1.Header)); in performFusion()
1708 FC0.Latch, FC0.Header)); in performFusion()
1710 FC1.Latch, FC0.Header)); in performFusion()
1712 FC1.Latch, FC1.Header)); in performFusion()
1734 // Move instructions from FC0.Latch to FC1.Latch. in performFusion()
1811 /// The exit block successor for the latch of FC0 is updated to be the header
1812 /// of FC1 and the non-exit block successor of the latch of FC1 is updated to
1887 // block is the latch block of the first loop. Nothing needs to be done in fuseGuardedLoops()
1888 // anyway as all loop carried values dominate the latch and thereby also the in fuseGuardedLoops()
1890 // KB: This is no longer necessary because FC0.ExitingBlock == FC0.Latch in fuseGuardedLoops()
1894 if (FC0.ExitingBlock != FC0.Latch) in fuseGuardedLoops()
1902 FC0.Latch->replaceSuccessorsPhiUsesWith(FC1.Latch); in fuseGuardedLoops()
1910 // the new values do only need to dominate their latch and not the exiting in fuseGuardedLoops()
1913 // value, if the second header was reached through an old latch of the in fuseGuardedLoops()
1960 int L1LatchBBIdx = LCPHI->getBasicBlockIndex(FC1.Latch); in fuseGuardedLoops()
1969 L1HeaderPHI->addIncoming(LCV, FC0.Latch); in fuseGuardedLoops()
1978 // Replace latch terminator destinations. in fuseGuardedLoops()
1979 FC0.Latch->getTerminator()->replaceUsesOfWith(FC0.Header, FC1.Header); in fuseGuardedLoops()
1980 FC1.Latch->getTerminator()->replaceUsesOfWith(FC1.Header, FC0.Header); in fuseGuardedLoops()
1982 // Modify the latch branch of FC0 to be unconditional as both successors of in fuseGuardedLoops()
1986 // If FC0.Latch and FC0.ExitingBlock are the same then we have already in fuseGuardedLoops()
1988 if (FC0.Latch != FC0.ExitingBlock) in fuseGuardedLoops()
1990 DominatorTree::Insert, FC0.Latch, FC1.Header)); in fuseGuardedLoops()
1993 FC0.Latch, FC0.Header)); in fuseGuardedLoops()
1995 FC1.Latch, FC0.Header)); in fuseGuardedLoops()
1997 FC1.Latch, FC1.Header)); in fuseGuardedLoops()
2028 // Move instructions from FC0.Latch to FC1.Latch. in fuseGuardedLoops()