Home
last modified time | relevance | path

Searched refs:Preheader (Results 1 – 25 of 33) sorted by relevance

12

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DLoopFuse.cpp137 BasicBlock *Preheader; member
168 : Preheader(L->getLoopPreheader()), Header(L->getHeader()), in FusionCandidate()
214 return Preheader && Header && ExitingBlock && ExitBlock && Latch && L && in isValid()
222 assert(Preheader == L->getLoopPreheader() && "Preheader is out of sync"); in verify()
239 return Preheader; in getEntryBlock()
253 return (GuardBranch->getSuccessor(0) == Preheader) in getNonLoopBlock()
267 << "\tPreheader: " << (Preheader ? Preheader->getName() : "nullptr") in dump()
287 if (!Preheader) in isEligibleForFusion()
339 assert(L && Preheader && "Fusion candidate not initialized properly!"); in reportInvalidCandidate()
342 L->getStartLoc(), Preheader) in reportInvalidCandidate()
[all …]
DLoopDeletion.cpp46 BasicBlock *Preheader) { in isLoopDead() argument
70 if (!L->makeLoopInvariant(I, Changed, Preheader->getTerminator())) { in isLoopDead()
97 auto *Preheader = L->getLoopPreheader(); in isLoopNeverExecuted() local
100 assert(Preheader && "Needs preheader!"); in isLoopNeverExecuted()
102 if (Preheader == &Preheader->getParent()->getEntryBlock()) in isLoopNeverExecuted()
106 for (auto *Pred: predecessors(Preheader)) { in isLoopNeverExecuted()
114 if (Taken == Preheader) in isLoopNeverExecuted()
117 assert(!pred_empty(Preheader) && in isLoopNeverExecuted()
143 BasicBlock *Preheader = L->getLoopPreheader(); in deleteLoopIfDead() local
144 if (!Preheader || !L->hasDedicatedExits()) { in deleteLoopIfDead()
[all …]
DLoopSink.cpp256 BasicBlock *Preheader = L.getLoopPreheader(); in sinkLoopInvariantInstructions() local
257 if (!Preheader) in sinkLoopInvariantInstructions()
262 if (!Preheader->getParent()->hasProfileData()) in sinkLoopInvariantInstructions()
265 const BlockFrequency PreheaderFreq = BFI.getBlockFreq(Preheader); in sinkLoopInvariantInstructions()
280 CurAST.add(*Preheader); in sinkLoopInvariantInstructions()
298 for (auto II = Preheader->rbegin(), E = Preheader->rend(); II != E;) { in sinkLoopInvariantInstructions()
DInductiveRangeCheckElimination.cpp578 changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
759 BasicBlock *Preheader = L.getLoopPreheader(); in parseLoopStructure() local
760 if (!Preheader) { in parseLoopStructure()
932 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
999 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
1014 const DataLayout &DL = Preheader->getModule()->getDataLayout(); in parseLoopStructure()
1017 .expandCodeFor(IndVarStart, IndVarTy, Preheader->getTerminator()); in parseLoopStructure()
1180 const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt, in changeIterationSpaceEnd() argument
1261 BranchInst *PreheaderJump = cast<BranchInst>(Preheader->getTerminator()); in changeIterationSpaceEnd()
1316 NewPHI->addIncoming(PN.getIncomingValueForBlock(Preheader), Preheader); in changeIterationSpaceEnd()
[all …]
DLoopSimplifyCFG.cpp356 BasicBlock *Preheader = L.getLoopPreheader(); in handleDeadExits() local
358 Preheader, Preheader->getTerminator(), &DT, &LI, MSSAU); in handleDeadExits()
360 IRBuilder<> Builder(Preheader->getTerminator()); in handleDeadExits()
363 Preheader->getTerminator()->eraseFromParent(); in handleDeadExits()
378 DTUpdates.push_back({DominatorTree::Insert, Preheader, BB}); in handleDeadExits()
383 if (Loop *OuterLoop = LI.getLoopFor(Preheader)) { in handleDeadExits()
DLoopIdiomRecognize.cpp899 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStridedStore() local
900 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore()
922 Expander.expandCodeFor(Start, DestInt8PtrTy, Preheader->getTerminator()); in processLoopStridedStore()
945 Expander.expandCodeFor(NumBytesS, IntIdxTy, Preheader->getTerminator()); in processLoopStridedStore()
979 NewCall->getDebugLoc(), Preheader) in processLoopStridedStore()
1019 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStoreOfLoopLoad() local
1020 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1038 StrStart, Builder.getInt8PtrTy(StrAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1060 LdStart, Builder.getInt8PtrTy(LdAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1080 Expander.expandCodeFor(NumBytesS, IntIdxTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
[all …]
DLoopPredication.cpp261 BasicBlock *Preheader; member in __anon325dfe6a0111::LoopPredication
509 return Preheader->getTerminator(); in findInsertPt()
519 !isSafeToExpandAt(Op, Preheader->getTerminator(), *SE)) in findInsertPt()
521 return Preheader->getTerminator(); in findInsertPt()
1214 Preheader = L->getLoopPreheader(); in runOnLoop()
1215 if (!Preheader) in runOnLoop()
DLICM.cpp372 BasicBlock *Preheader = L->getLoopPreheader(); in runOnLoop() local
394 if (Preheader) in runOnLoop()
406 if (!DisablePromotion && Preheader && L->hasDedicatedExits() && in runOnLoop()
1894 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in promoteLoopAccessesToScalars() local
1946 const DataLayout &MDL = Preheader->getModule()->getDataLayout(); in promoteLoopAccessesToScalars()
1999 ORE, Preheader->getTerminator())) { in promoteLoopAccessesToScalars()
2050 Preheader->getTerminator(), DT); in promoteLoopAccessesToScalars()
2132 SomePtr->getName() + ".promoted", Preheader->getTerminator()); in promoteLoopAccessesToScalars()
2139 SSA.AddAvailableValue(Preheader, PreheaderLoad); in promoteLoopAccessesToScalars()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DMachineLoopUtils.cpp32 MachineBasicBlock *Preheader = *Loop->pred_begin(); in PeelSingleBlockLoop() local
33 if (Preheader == Loop) in PeelSingleBlockLoop()
34 Preheader = *std::next(Loop->pred_begin()); in PeelSingleBlockLoop()
83 if (MI.getOperand(2).getMBB() != Preheader) in PeelSingleBlockLoop()
108 Preheader->replaceSuccessor(Loop, NewBB); in PeelSingleBlockLoop()
110 Loop->replacePhiUsesWith(Preheader, NewBB); in PeelSingleBlockLoop()
111 if (TII->removeBranch(*Preheader) > 0) in PeelSingleBlockLoop()
112 TII->insertBranch(*Preheader, NewBB, nullptr, {}, DL); in PeelSingleBlockLoop()
DMachineLICM.cpp273 bool Hoist(MachineInstr *MI, MachineBasicBlock *Preheader);
525 MachineBasicBlock *Preheader = getCurPreheader(); in HoistRegionPostRA() local
526 if (!Preheader) in HoistRegionPostRA()
559 MachineBasicBlock::iterator TI = Preheader->getFirstTerminator(); in HoistRegionPostRA()
560 if (TI != Preheader->end()) { in HoistRegionPostRA()
626 MachineBasicBlock *Preheader = getCurPreheader(); in HoistPostRA() local
630 LLVM_DEBUG(dbgs() << "Hoisting to " << printMBBReference(*Preheader) in HoistPostRA()
636 Preheader->splice(Preheader->getFirstTerminator(), MBB, MI); in HoistPostRA()
707 MachineBasicBlock *Preheader = getCurPreheader(); in HoistOutOfLoop() local
708 if (!Preheader) in HoistOutOfLoop()
[all …]
DMachineLoopInfo.cpp127 MachineBasicBlock *Preheader = nullptr; in findLoopPreheader() local
132 if (Preheader) in findLoopPreheader()
134 Preheader = P; in findLoopPreheader()
139 for (MachineBasicBlock *S : Preheader->successors()) { in findLoopPreheader()
146 return Preheader; in findLoopPreheader()
DHardwareLoops.cpp301 BasicBlock *Preheader = L->getLoopPreheader(); in TryConvertLoop() local
304 if (!Preheader) in TryConvertLoop()
305 Preheader = InsertPreheaderForLoop(L, DT, LI, nullptr, PreserveLCSSA); in TryConvertLoop()
306 if (!Preheader) in TryConvertLoop()
342 BasicBlock *Preheader = L->getLoopPreheader(); in CanGenerateTest() local
343 if (!Preheader->getSinglePredecessor()) in CanGenerateTest()
346 BasicBlock *Pred = Preheader->getSinglePredecessor(); in CanGenerateTest()
371 if (BI->getSuccessor(SuccIdx) != Preheader) in CanGenerateTest()
490 BasicBlock *Preheader = L->getLoopPreheader(); in InsertPHICounter() local
495 Index->addIncoming(NumElts, Preheader); in InsertPHICounter()
DModuloSchedule.cpp69 Preheader = *BB->pred_begin(); in expand()
70 if (Preheader == BB) in expand()
71 Preheader = *std::next(BB->pred_begin()); in expand()
177 addBranches(*Preheader, PrologBBs, KernelBB, EpilogBBs, VRMap); in generatePipelinedLoop()
195 MachineBasicBlock *PredBB = Preheader; in generateProlog()
239 unsigned numBranches = TII->removeBranch(*Preheader); in generateProlog()
242 TII->insertBranch(*Preheader, PrologBBs[0], nullptr, Cond, DebugLoc()); in generateProlog()
1978 Preheader = Schedule.getLoop()->getLoopPreheader(); in expand()
1990 Preheader = Schedule.getLoop()->getLoopPreheader(); in validateAgainstModuloScheduleExpander()
2012 Preheader->addSuccessor(BB); in validateAgainstModuloScheduleExpander()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DLoopSimplify.cpp225 static Loop *separateNestedLoop(Loop *L, BasicBlock *Preheader, in separateNestedLoop() argument
230 if (!Preheader) in separateNestedLoop()
349 static BasicBlock *insertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader, in insertUniqueBackedgeBlock() argument
359 if (!Preheader) in insertUniqueBackedgeBlock()
374 if (P != Preheader) BackedgeBlocks.push_back(P); in insertUniqueBackedgeBlock()
405 if (IBB == Preheader) { in insertUniqueBackedgeBlock()
465 MSSAU->updatePhisWhenInsertingUniqueBackedgeBlock(Header, Preheader, in insertUniqueBackedgeBlock()
537 BasicBlock *Preheader = L->getLoopPreheader(); in simplifyOneLoop() local
538 if (!Preheader) { in simplifyOneLoop()
539 Preheader = InsertPreheaderForLoop(L, DT, LI, MSSAU, PreserveLCSSA); in simplifyOneLoop()
[all …]
DIntegerDivision.cpp225 BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(), in generateUnsignedDivisionCode() local
275 Builder.CreateCondBr(SkipLoop, LoopExit, Preheader); in generateUnsignedDivisionCode()
281 Builder.SetInsertPoint(Preheader); in generateUnsignedDivisionCode()
344 Carry_1->addIncoming(Zero, Preheader); in generateUnsignedDivisionCode()
347 SR_3->addIncoming(SR_1, Preheader); in generateUnsignedDivisionCode()
350 R_1->addIncoming(Tmp3, Preheader); in generateUnsignedDivisionCode()
353 Q_2->addIncoming(Q, Preheader); in generateUnsignedDivisionCode()
DLoopUtils.cpp510 auto *Preheader = L->getLoopPreheader(); in deleteDeadLoop() local
511 assert(Preheader && "Preheader should exist!"); in deleteDeadLoop()
529 auto *OldBr = dyn_cast<BranchInst>(Preheader->getTerminator()); in deleteDeadLoop()
569 P.setIncomingBlock(PredIndex, Preheader); in deleteDeadLoop()
581 P.getIncomingBlock(PredIndex) == Preheader) && in deleteDeadLoop()
586 Builder.SetInsertPoint(Preheader->getTerminator()); in deleteDeadLoop()
589 Preheader->getTerminator()->eraseFromParent(); in deleteDeadLoop()
595 DTU.applyUpdates({{DominatorTree::Insert, Preheader, ExitBlock}, in deleteDeadLoop()
596 {DominatorTree::Delete, Preheader, L->getHeader()}}); in deleteDeadLoop()
DLoopUnrollRuntime.cpp303 BasicBlock *InsertBot, BasicBlock *Preheader, in CloneLoopBlocks() argument
380 unsigned idx = NewPHI->getBasicBlockIndex(Preheader); in CloneLoopBlocks()
384 VMap[&*I] = NewPHI->getIncomingValueForBlock(Preheader); in CloneLoopBlocks()
388 unsigned idx = NewPHI->getBasicBlockIndex(Preheader); in CloneLoopBlocks()
DLoopUnroll.cpp283 BasicBlock *Preheader = L->getLoopPreheader(); in UnrollLoop() local
284 if (!Preheader) { in UnrollLoop()
411 Preheader = L->getLoopPreheader(); in UnrollLoop()
698 PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); in UnrollLoop()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/ARM/
DMVETailPredication.cpp142 BasicBlock *Preheader = L->getLoopPreheader(); in runOnLoop() local
143 if (!Preheader) in runOnLoop()
161 IntrinsicInst *Setup = FindLoopIterations(Preheader); in runOnLoop()
165 if (!Preheader->getSinglePredecessor()) in runOnLoop()
167 Setup = FindLoopIterations(Preheader->getSinglePredecessor()); in runOnLoop()
DARMLowOverheadLoops.cpp587 if (auto *Preheader = ML->getLoopPreheader()) in ProcessLoop()
588 dbgs() << " - " << Preheader->getName() << "\n"; in ProcessLoop()
589 else if (auto *Preheader = MLI->findLoopPreheader(ML)) in ProcessLoop()
590 dbgs() << " - " << Preheader->getName() << "\n"; in ProcessLoop()
612 if (auto *Preheader = ML->getLoopPreheader()) in ProcessLoop() local
613 LoLoop.Start = SearchForStart(Preheader); in ProcessLoop()
614 else if (auto *Preheader = MLI->findLoopPreheader(ML, true)) in ProcessLoop() local
615 LoLoop.Start = SearchForStart(Preheader); in ProcessLoop()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/
DHexagonHardwareLoops.cpp408 MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); in findInductionRegister() local
411 if (!Header || !Preheader || !Latch || !ExitingBlock) in findInductionRegister()
602 MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); in getLoopTripCount() local
609 if (MBB == Preheader) in getLoopTripCount()
1194 MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); in convertToHardwareLoop() local
1195 if (!Preheader) { in convertToHardwareLoop()
1196 Preheader = createPreheaderForLoop(L); in convertToHardwareLoop()
1197 if (!Preheader) in convertToHardwareLoop()
1201 MachineBasicBlock::iterator InsertPos = Preheader->getFirstTerminator(); in convertToHardwareLoop()
1215 if (!MDT->dominates(BBDef, Preheader)) in convertToHardwareLoop()
[all …]
DHexagonLoopIdiomRecognition.cpp2031 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processCopyingStore() local
2032 Instruction *ExpPt = Preheader->getTerminator(); in processCopyingStore()
2173 Loop *ParentL = LF->getLoopFor(Preheader); in processCopyingStore()
2187 int bx = PN->getBasicBlockIndex(Preheader); in processCopyingStore()
2191 DT->addNewBlock(NewPreheader, Preheader); in processCopyingStore()
2225 Instruction *OldT = Preheader->getTerminator(); in processCopyingStore()
2228 Preheader->setName(Preheader->getName()+".old"); in processCopyingStore()
2229 DT->addNewBlock(MemmoveB, Preheader); in processCopyingStore()
2231 BasicBlock *ExitD = Preheader; in processCopyingStore()
2242 if (ExitD && DT->dominates(Preheader, ExitD)) { in processCopyingStore()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DLoopInfo.cpp94 BasicBlock *Preheader = getLoopPreheader(); in makeLoopInvariant() local
96 if (!Preheader) in makeLoopInvariant()
98 InsertPt = Preheader->getTerminator(); in makeLoopInvariant()
368 BasicBlock *Preheader = getLoopPreheader(); in getLoopGuardBranch() local
369 assert(Preheader && getLoopLatch() && in getLoopGuardBranch()
386 BasicBlock *GuardBB = Preheader->getUniquePredecessor(); in getLoopGuardBranch()
396 BasicBlock *GuardOtherSucc = (GuardBI->getSuccessor(0) == Preheader) in getLoopGuardBranch()
DScalarEvolutionExpander.cpp219 BasicBlock *Preheader = L->getLoopPreheader(); in InsertBinop() local
220 if (!Preheader) break; in InsertBinop()
223 Builder.SetInsertPoint(Preheader->getTerminator()); in InsertBinop()
548 BasicBlock *Preheader = L->getLoopPreheader(); in expandAddToGEP() local
549 if (!Preheader) break; in expandAddToGEP()
552 Builder.SetInsertPoint(Preheader->getTerminator()); in expandAddToGEP()
575 BasicBlock *Preheader = L->getLoopPreheader(); in expandAddToGEP() local
576 if (!Preheader) break; in expandAddToGEP()
579 Builder.SetInsertPoint(Preheader->getTerminator()); in expandAddToGEP()
1840 if (BasicBlock *Preheader = L->getLoopPreheader()) in expand() local
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/
DModuloSchedule.h170 MachineBasicBlock *Preheader; variable
284 MachineBasicBlock *Preheader; variable

12