Home
last modified time | relevance | path

Searched refs:Latch (Results 1 – 25 of 27) sorted by relevance

12

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DLoopUnrollRuntime.cpp84 BasicBlock *Latch = L->getLoopLatch(); in ConnectProlog() local
85 assert(Latch && "Loop must have a latch"); in ConnectProlog()
86 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]); in ConnectProlog()
93 for (BasicBlock *Succ : successors(Latch)) { in ConnectProlog()
115 Value *V = PN.getIncomingValueForBlock(Latch); in ConnectProlog()
188 BasicBlock *Latch = L->getLoopLatch(); in ConnectEpilog() local
189 assert(Latch && "Loop must have a latch"); in ConnectEpilog()
190 BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]); in ConnectEpilog()
226 Value *V = PN.getIncomingValueForBlock(Latch); in ConnectEpilog()
250 for (BasicBlock *Succ : successors(Latch)) { in ConnectEpilog()
[all …]
DLoopUnrollPeel.cpp89 const BasicBlock *Latch = L->getLoopLatch(); in canPeel() local
90 const BranchInst *T = dyn_cast<BranchInst>(Latch->getTerminator()); in canPeel()
91 return T && T->isConditional() && L->isLoopExiting(Latch) && in canPeel()
497 BasicBlock *Latch = L->getLoopLatch(); in cloneLoopBlocks() local
539 BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]); in cloneLoopBlocks()
562 Value *LatchVal = NewPHI->getIncomingValueForBlock(Latch); in cloneLoopBlocks()
611 BasicBlock *Latch = L->getLoopLatch(); in peelLoop() local
640 DT->getNode(Edge.second)->getIDom()->getBlock(), Latch); in peelLoop()
708 cast<BranchInst>(cast<BasicBlock>(Latch)->getTerminator()); in peelLoop()
756 Value *NewVal = PHI->getIncomingValueForBlock(Latch); in peelLoop()
DLoopRotationUtils.cpp605 BasicBlock *Latch = L->getLoopLatch(); in simplifyLoopLatch() local
606 if (!Latch || Latch->hasAddressTaken()) in simplifyLoopLatch()
609 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch()
613 BasicBlock *LastExit = Latch->getSinglePredecessor(); in simplifyLoopLatch()
621 if (!shouldSpeculateInstrs(Latch->begin(), Jmp->getIterator(), L)) in simplifyLoopLatch()
624 LLVM_DEBUG(dbgs() << "Folding loop latch " << Latch->getName() << " into " in simplifyLoopLatch()
628 MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr, in simplifyLoopLatch()
DLoopUnrollAndJam.cpp91 static bool processHeaderPhiOperands(BasicBlock *Header, BasicBlock *Latch, in processHeaderPhiOperands() argument
95 Value *V = Phi.getIncomingValueForBlock(Latch); in processHeaderPhiOperands()
117 BasicBlock *Latch, in moveHeaderPhiOperandsToForeBlocks() argument
123 processHeaderPhiOperands(Header, Latch, AftBlocks, in moveHeaderPhiOperandsToForeBlocks()
734 BasicBlock *Latch = L->getLoopLatch(); in isSafeToUnrollAndJam() local
740 if (Latch != Exit) in isSafeToUnrollAndJam()
793 Header, Latch, AftBlocks, [&AftBlocks, &SubLoop](Instruction *I) { in isSafeToUnrollAndJam()
DLoopUtils.cpp696 BasicBlock *Latch = L->getLoopLatch(); in getLoopEstimatedTripCount() local
697 if (!Latch) in getLoopEstimatedTripCount()
699 BranchInst *LatchBR = dyn_cast<BranchInst>(Latch->getTerminator()); in getLoopEstimatedTripCount()
700 if (!LatchBR || LatchBR->getNumSuccessors() != 2 || !L->isLoopExiting(Latch)) in getLoopEstimatedTripCount()
DLoopUnroll.cpp876 for (BasicBlock *Latch : Latches) { in UnrollLoop()
877 BranchInst *Term = dyn_cast<BranchInst>(Latch->getTerminator()); in UnrollLoop()
879 (CompletelyUnroll && !LatchIsExiting && Latch == Latches.back())) && in UnrollLoop()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DLoopFuse.cpp145 BasicBlock *Latch; member
170 Latch(L->getLoopLatch()), L(L), Valid(true), in FusionCandidate()
214 return Preheader && Header && ExitingBlock && ExitBlock && Latch && L && in isValid()
227 assert(Latch == L->getLoopLatch() && "Latch is out of sync"); in verify()
274 << "\tLatch: " << (Latch ? Latch->getName() : "nullptr") << "\n" in dump()
295 if (!Latch) in isEligibleForFusion()
1113 BranchInst *FCLatchBranch = dyn_cast<BranchInst>(FC.Latch->getTerminator()); in simplifyLatchBranch()
1126 moveInstsBottomUp(*FC0.Latch, *FC1.Latch, DT, PDT, DI); in mergeLatch()
1127 if (BasicBlock *Succ = FC0.Latch->getUniqueSuccessor()) { in mergeLatch()
1189 if (FC0.ExitingBlock != FC0.Latch) in performFusion()
[all …]
DInductiveRangeCheckElimination.cpp448 BasicBlock *Latch = nullptr; member
478 Result.Latch = cast<BasicBlock>(Map(Latch)); in map()
745 BasicBlock *Latch = L.getLoopLatch(); in parseLoopStructure() local
746 assert(Latch && "Simplified loops only have one latch!"); in parseLoopStructure()
748 if (Latch->getTerminator()->getMetadata(ClonedLoopTag)) { in parseLoopStructure()
753 if (!L.isLoopExiting(Latch)) { in parseLoopStructure()
765 BranchInst *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator()); in parseLoopStructure()
789 const SCEV *LatchCount = SE.getExitCount(&L, Latch); in parseLoopStructure()
1024 Result.Latch = Latch; in parseLoopStructure()
1255 BasicBlock *BBInsertLocation = LS.Latch->getNextNode(); in changeIterationSpaceEnd()
[all …]
DLoopUnrollAndJamPass.cpp289 BasicBlock *Latch = L->getLoopLatch(); in tryToUnrollAndJamLoop() local
294 if (Latch != Exit || SubLoopLatch != SubLoopExit) in tryToUnrollAndJamLoop()
374 unsigned OuterTripCount = SE.getSmallConstantTripCount(L, Latch); in tryToUnrollAndJamLoop()
375 unsigned OuterTripMultiple = SE.getSmallConstantTripMultiple(L, Latch); in tryToUnrollAndJamLoop()
DLoopPredication.cpp1065 auto *Latch = L->getLoopLatch(); in predicateLoopExits() local
1066 if (!Latch) in predicateLoopExits()
1073 const SCEV *LatchEC = SE->getExitCount(L, Latch); in predicateLoopExits()
1170 assert(!Latch || DT->dominates(ExitingBB, Latch)); in predicateLoopExits()
DLoopLoadElimination.cpp151 return llvm::all_of(Latches, [&](const BasicBlock *Latch) { in doesStoreDominatesAllLatches() argument
152 return DT->dominates(StoreBlock, Latch); in doesStoreDominatesAllLatches()
DLoopUnswitch.cpp1532 BasicBlock *Latch = L->getLoopLatch(); in RewriteLoopBodyWithConditionConstant() local
1538 if (Latch && DT->dominates(SISucc, Latch)) in RewriteLoopBodyWithConditionConstant()
DSimpleLoopUnswitch.cpp2477 BasicBlock *Latch = L.getLoopLatch(); in calculateUnswitchCostMultiplier() local
2479 if (DT.dominates(CondBlock, Latch) && in calculateUnswitchCostMultiplier()
2497 bool SkipExitingSuccessors = DT.dominates(CondBlock, Latch); in calculateUnswitchCostMultiplier()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/
DHexagonHardwareLoops.cpp409 MachineBasicBlock *Latch = L->getLoopLatch(); in findInductionRegister() local
411 if (!Header || !Preheader || !Latch || !ExitingBlock) in findInductionRegister()
436 if (Phi->getOperand(i+1).getMBB() != Latch) in findInductionRegister()
606 MachineBasicBlock *Latch = L->getLoopLatch(); in getLoopTripCount() local
611 else if (MBB == Latch) in getLoopTripCount()
628 if (ExitingBlock != Latch && (TB == Latch || FB == Latch)) { in getLoopTripCount()
631 bool NotAnalyzed = TII->analyzeBranch(*Latch, LTB, LFB, LCond, false); in getLoopTripCount()
634 if (TB == Latch) in getLoopTripCount()
1609 MachineBasicBlock *Latch = L->getLoopLatch(); in fixupInductionVariable() local
1612 if (!(Header && Latch && ExitingBlock)) in fixupInductionVariable()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DMachineLoopInfo.cpp89 if (MachineBasicBlock *Latch = getLoopLatch()) { in findLoopControlBlock() local
90 if (isLoopExiting(Latch)) in findLoopControlBlock()
91 return Latch; in findLoopControlBlock()
DHardwareLoops.cpp492 BasicBlock *Latch = ExitBranch->getParent(); in InsertPHICounter() local
496 Index->addIncoming(EltsRem, Latch); in InsertPHICounter()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DParallel.h40 class Latch {
46 explicit Latch(uint32_t Count = 0) : Count(Count) {} in Count()
47 ~Latch() { sync(); } in ~Latch()
67 Latch L;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DIVDescriptors.cpp682 auto *Latch = TheLoop->getLoopLatch(); in isFirstOrderRecurrence() local
683 if (!Preheader || !Latch) in isFirstOrderRecurrence()
688 Phi->getBasicBlockIndex(Latch) < 0) in isFirstOrderRecurrence()
693 auto *Previous = dyn_cast<Instruction>(Phi->getIncomingValueForBlock(Latch)); in isFirstOrderRecurrence()
968 BasicBlock *Latch = L->getLoopLatch(); in getCastsForInductionPHI() local
969 if (!Latch) in getCastsForInductionPHI()
971 Value *Val = PN->getIncomingValueForBlock(Latch); in getCastsForInductionPHI()
1080 BasicBlock *Latch = AR->getLoop()->getLoopLatch(); in isInductionPHI() local
1081 if (!Latch) in isInductionPHI()
1084 dyn_cast<BinaryOperator>(Phi->getIncomingValueForBlock(Latch)); in isInductionPHI()
DLoopInfo.cpp173 if (BasicBlock *Latch = L.getLoopLatch()) in getLatchCmpInst() local
174 if (BranchInst *BI = dyn_cast_or_null<BranchInst>(Latch->getTerminator())) in getLatchCmpInst()
231 BasicBlock *Latch = L.getLoopLatch(); in getCanonicalPredicate() local
232 assert(Latch && "Expecting valid latch"); in getCanonicalPredicate()
234 BranchInst *BI = dyn_cast_or_null<BranchInst>(Latch->getTerminator()); in getCanonicalPredicate()
DScalarEvolution.cpp4335 if (BasicBlock *Latch = L->getLoopLatch()) { in rewrite() local
4336 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator()); in rewrite()
6940 const BasicBlock *Latch = L->getLoopLatch(); in getExact() local
6942 if (!Latch) in getExact()
6951 assert(SE->DT.dominates(ENT.ExitingBlock, Latch) && in getExact()
7109 BasicBlock *Latch = L->getLoopLatch(); // may be NULL. in computeBackedgeTakenCount() local
7154 if (EL.MaxNotTaken != getCouldNotCompute() && Latch && in computeBackedgeTakenCount()
7155 DT.dominates(ExitBB, Latch)) { in computeBackedgeTakenCount()
7187 const BasicBlock *Latch = L->getLoopLatch(); in computeExitLimit() local
7188 if (!Latch || !DT.dominates(ExitingBlock, Latch)) in computeExitLimit()
[all …]
DLoopAccessAnalysis.cpp2084 BasicBlock* Latch = TheLoop->getLoopLatch(); in blockNeedsPredication() local
2085 return !DT->dominates(BB, Latch); in blockNeedsPredication()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DLoopInfoImpl.h124 const BlockT *Latch = getLoopLatch(); in getUniqueNonLatchExitBlocks() local
125 assert(Latch && "Latch block must exists"); in getUniqueNonLatchExitBlocks()
127 [Latch](const BlockT *BB) { return BB != Latch; }); in getUniqueNonLatchExitBlocks()
212 BlockT *Latch = nullptr; in getLoopLatch() local
215 if (Latch) in getLoopLatch()
217 Latch = Pred; in getLoopLatch()
221 return Latch; in getLoopLatch()
DLoopInfo.h766 BasicBlock *Latch = getLoopLatch(); in isRotatedForm() local
767 return Latch && isLoopExiting(Latch); in isRotatedForm()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Vectorize/
DLoopVectorizationLegality.cpp314 BasicBlock *Latch = Lp->getLoopLatch(); in isUniformLoop() local
315 auto *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator()); in isUniformLoop()
331 Value *IVUpdate = IV->getIncomingValueForBlock(Latch); in isUniformLoop()
DLoopVectorize.cpp2533 BasicBlock *Latch = L->getLoopLatch(); in createInductionVariable() local
2536 if (!Latch) in createInductionVariable()
2537 Latch = Header; in createInductionVariable()
2544 Builder.SetInsertPoint(Latch->getTerminator()); in createInductionVariable()
2550 Induction->addIncoming(Next, Latch); in createInductionVariable()
2556 Latch->getTerminator()->eraseFromParent(); in createInductionVariable()
3555 auto *Latch = OrigLoop->getLoopLatch(); in fixFirstOrderRecurrence() local
3559 auto *Previous = Phi->getIncomingValueForBlock(Latch); in fixFirstOrderRecurrence()
3744 BasicBlock *Latch = OrigLoop->getLoopLatch(); in fixReduction() local
3745 Value *LoopVal = Phi->getIncomingValueForBlock(Latch); in fixReduction()
[all …]

12