Home
last modified time | relevance | path

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

123

/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
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 …]
DInductiveRangeCheckElimination.cpp622 changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
846 BasicBlock *Preheader = L.getLoopPreheader(); in parseLoopStructure() local
847 if (!Preheader) { in parseLoopStructure()
1019 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
1086 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
1101 const DataLayout &DL = Preheader->getModule()->getDataLayout(); in parseLoopStructure()
1104 .expandCodeFor(IndVarStart, IndVarTy, Preheader->getTerminator()); in parseLoopStructure()
1253 const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt, in changeIterationSpaceEnd() argument
1334 BranchInst *PreheaderJump = cast<BranchInst>(Preheader->getTerminator()); in changeIterationSpaceEnd()
1397 NewPHI->addIncoming(PN.getIncomingValueForBlock(Preheader), Preheader); in changeIterationSpaceEnd()
[all …]
DLoopSink.cpp254 BasicBlock *Preheader = L.getLoopPreheader(); in sinkLoopInvariantInstructions() local
255 if (!Preheader) in sinkLoopInvariantInstructions()
260 if (!Preheader->getParent()->hasProfileData()) in sinkLoopInvariantInstructions()
263 const BlockFrequency PreheaderFreq = BFI.getBlockFreq(Preheader); in sinkLoopInvariantInstructions()
296 for (auto II = Preheader->rbegin(), E = Preheader->rend(); II != E;) { in sinkLoopInvariantInstructions()
DLICM.cpp260 BasicBlock *Preheader = L->getLoopPreheader(); in runOnLoop() local
279 if (Preheader) in runOnLoop()
290 if (!DisablePromotion && Preheader && L->hasDedicatedExits()) { in runOnLoop()
1036 auto *Preheader = CurLoop->getLoopPreheader(); in hoist() local
1037 LLVM_DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " << I in hoist()
1056 I.moveBefore(Preheader->getTerminator()); in hoist()
1225 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in promoteLoopAccessesToScalars() local
1277 const DataLayout &MDL = Preheader->getModule()->getDataLayout(); in promoteLoopAccessesToScalars()
1322 *Load, DT, CurLoop, SafetyInfo, ORE, Preheader->getTerminator()); in promoteLoopAccessesToScalars()
1370 Preheader->getTerminator(), DT); in promoteLoopAccessesToScalars()
[all …]
DLoopIdiomRecognize.cpp867 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStridedStore() local
868 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore()
890 Expander.expandCodeFor(Start, DestInt8PtrTy, Preheader->getTerminator()); in processLoopStridedStore()
913 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStridedStore()
980 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStoreOfLoopLoad() local
981 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
999 StrStart, Builder.getInt8PtrTy(StrAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1021 LdStart, Builder.getInt8PtrTy(LdAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1041 Expander.expandCodeFor(NumBytesS, IntPtrTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
1556 BasicBlock *Preheader, Instruction *CntInst, PHINode *CntPhi, Value *InitX, in transformLoopToCountable() argument
[all …]
DLoopPredication.cpp243 BasicBlock *Preheader; member in __anon55fdd7d90111::LoopPredication
461 Instruction *InsertAt = Preheader->getTerminator(); in widenICmpRangeCheckIncrementingLoop()
495 Instruction *InsertAt = Preheader->getTerminator(); in widenICmpRangeCheckDecrementingLoop()
577 IRBuilder<> Builder(cast<Instruction>(Preheader->getTerminator())); in widenGuardConditions()
794 Preheader = L->getLoopPreheader(); in runOnLoop()
795 if (!Preheader) in runOnLoop()
/external/llvm/lib/Transforms/Scalar/
DInductiveRangeCheckElimination.cpp541 changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
634 BasicBlock *Preheader = L.getLoopPreheader(); in parseLoopStructure() local
635 if (!Preheader) { in parseLoopStructure()
766 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
788 IRBuilder<> B(Preheader->getTerminator()); in parseLoopStructure()
804 const DataLayout &DL = Preheader->getModule()->getDataLayout(); in parseLoopStructure()
807 .expandCodeFor(IndVarStart, IndVarTy, Preheader->getTerminator()); in parseLoopStructure()
946 const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt, in changeIterationSpaceEnd() argument
1029 BranchInst *PreheaderJump = cast<BranchInst>(Preheader->getTerminator()); in changeIterationSpaceEnd()
1078 NewPHI->addIncoming(PN->getIncomingValueForBlock(Preheader), Preheader); in changeIterationSpaceEnd()
[all …]
DLICM.cpp225 BasicBlock *Preheader = L->getLoopPreheader(); in runOnLoop() local
244 if (Preheader) in runOnLoop()
250 if (!DisablePromotion && (Preheader || L->hasDedicatedExits())) { in runOnLoop()
721 auto *Preheader = CurLoop->getLoopPreheader(); in hoist() local
722 DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " << I in hoist()
737 I.moveBefore(Preheader->getTerminator()); in hoist()
863 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in promoteLoopAccessesToScalars() local
909 if (!HasDedicatedExits || !Preheader) in promoteLoopAccessesToScalars()
912 const DataLayout &MDL = Preheader->getModule()->getDataLayout(); in promoteLoopAccessesToScalars()
953 *Load, DT, CurLoop, SafetyInfo, Preheader->getTerminator()); in promoteLoopAccessesToScalars()
[all …]
/external/llvm/lib/CodeGen/
DMachineLICM.cpp231 bool Hoist(MachineInstr *MI, MachineBasicBlock *Preheader);
439 MachineBasicBlock *Preheader = getCurPreheader(); in HoistRegionPostRA() local
440 if (!Preheader) in HoistRegionPostRA()
474 MachineBasicBlock::iterator TI = Preheader->getFirstTerminator(); in HoistRegionPostRA()
475 if (TI != Preheader->end()) { in HoistRegionPostRA()
542 MachineBasicBlock *Preheader = getCurPreheader(); in HoistPostRA() local
546 DEBUG(dbgs() << "Hoisting to BB#" << Preheader->getNumber() << " from BB#" in HoistPostRA()
551 Preheader->splice(Preheader->getFirstTerminator(), MBB, MI); in HoistPostRA()
623 MachineBasicBlock *Preheader = getCurPreheader(); in HoistOutOfLoop() local
624 if (!Preheader) in HoistOutOfLoop()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DMachineLICM.cpp246 bool Hoist(MachineInstr *MI, MachineBasicBlock *Preheader);
487 MachineBasicBlock *Preheader = getCurPreheader(); in HoistRegionPostRA() local
488 if (!Preheader) in HoistRegionPostRA()
522 MachineBasicBlock::iterator TI = Preheader->getFirstTerminator(); in HoistRegionPostRA()
523 if (TI != Preheader->end()) { in HoistRegionPostRA()
590 MachineBasicBlock *Preheader = getCurPreheader(); in HoistPostRA() local
594 LLVM_DEBUG(dbgs() << "Hoisting to " << printMBBReference(*Preheader) in HoistPostRA()
600 Preheader->splice(Preheader->getFirstTerminator(), MBB, MI); in HoistPostRA()
671 MachineBasicBlock *Preheader = getCurPreheader(); in HoistOutOfLoop() local
672 if (!Preheader) in HoistOutOfLoop()
[all …]
DMachineLoopInfo.cpp120 MachineBasicBlock *Preheader = nullptr; in findLoopPreheader() local
125 if (Preheader) in findLoopPreheader()
127 Preheader = P; in findLoopPreheader()
132 for (MachineBasicBlock *S : Preheader->successors()) { in findLoopPreheader()
139 return Preheader; in findLoopPreheader()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DLoopSimplify.cpp217 static Loop *separateNestedLoop(Loop *L, BasicBlock *Preheader, in separateNestedLoop() argument
222 if (!Preheader) in separateNestedLoop()
341 static BasicBlock *insertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader, in insertUniqueBackedgeBlock() argument
350 if (!Preheader) in insertUniqueBackedgeBlock()
365 if (P != Preheader) BackedgeBlocks.push_back(P); in insertUniqueBackedgeBlock()
396 if (IBB == Preheader) { in insertUniqueBackedgeBlock()
519 BasicBlock *Preheader = L->getLoopPreheader(); in simplifyOneLoop() local
520 if (!Preheader) { in simplifyOneLoop()
521 Preheader = InsertPreheaderForLoop(L, DT, LI, PreserveLCSSA); in simplifyOneLoop()
522 if (Preheader) in simplifyOneLoop()
[all …]
DIntegerDivision.cpp226 BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(), in generateUnsignedDivisionCode() local
276 Builder.CreateCondBr(SkipLoop, LoopExit, Preheader); in generateUnsignedDivisionCode()
282 Builder.SetInsertPoint(Preheader); in generateUnsignedDivisionCode()
345 Carry_1->addIncoming(Zero, Preheader); in generateUnsignedDivisionCode()
348 SR_3->addIncoming(SR_1, Preheader); in generateUnsignedDivisionCode()
351 R_1->addIncoming(Tmp3, Preheader); in generateUnsignedDivisionCode()
354 Q_2->addIncoming(Q, Preheader); in generateUnsignedDivisionCode()
/external/llvm/lib/Transforms/Utils/
DLoopSimplify.cpp249 static Loop *separateNestedLoop(Loop *L, BasicBlock *Preheader, in separateNestedLoop() argument
254 if (!Preheader) in separateNestedLoop()
352 static BasicBlock *insertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader, in insertUniqueBackedgeBlock() argument
361 if (!Preheader) in insertUniqueBackedgeBlock()
376 if (P != Preheader) BackedgeBlocks.push_back(P); in insertUniqueBackedgeBlock()
407 if (IBB == Preheader) { in insertUniqueBackedgeBlock()
525 BasicBlock *Preheader = L->getLoopPreheader(); in simplifyOneLoop() local
526 if (!Preheader) { in simplifyOneLoop()
527 Preheader = InsertPreheaderForLoop(L, DT, LI, PreserveLCSSA); in simplifyOneLoop()
528 if (Preheader) { in simplifyOneLoop()
[all …]
DIntegerDivision.cpp226 BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(), in generateUnsignedDivisionCode() local
276 Builder.CreateCondBr(SkipLoop, LoopExit, Preheader); in generateUnsignedDivisionCode()
282 Builder.SetInsertPoint(Preheader); in generateUnsignedDivisionCode()
345 Carry_1->addIncoming(Zero, Preheader); in generateUnsignedDivisionCode()
348 SR_3->addIncoming(SR_1, Preheader); in generateUnsignedDivisionCode()
351 R_1->addIncoming(Tmp3, Preheader); in generateUnsignedDivisionCode()
354 Q_2->addIncoming(Q, Preheader); in generateUnsignedDivisionCode()
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/
DLoopSimplify.cpp103 BasicBlock *InsertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader);
201 BasicBlock *Preheader = L->getLoopPreheader(); in ProcessLoop() local
202 if (!Preheader) { in ProcessLoop()
203 Preheader = InsertPreheaderForLoop(L); in ProcessLoop()
204 if (Preheader) { in ProcessLoop()
255 LoopLatch = InsertUniqueBackedgeBlock(L, Preheader); in ProcessLoop()
311 Preheader ? Preheader->getTerminator() : 0)) { in ProcessLoop()
632 LoopSimplify::InsertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader) { in InsertUniqueBackedgeBlock() argument
640 if (!Preheader) in InsertUniqueBackedgeBlock()
652 if (P != Preheader) BackedgeBlocks.push_back(P); in InsertUniqueBackedgeBlock()
[all …]
/external/swiftshader/third_party/LLVM/lib/CodeGen/
DMachineLICM.cpp267 bool Hoist(MachineInstr *MI, MachineBasicBlock *Preheader);
558 MachineBasicBlock *Preheader = getCurPreheader(); in HoistPostRA() local
559 if (!Preheader) return; in HoistPostRA()
565 if (Preheader->getBasicBlock()) in HoistPostRA()
567 << Preheader->getName(); in HoistPostRA()
576 Preheader->splice(Preheader->getFirstTerminator(), MBB, MI); in HoistPostRA()
625 MachineBasicBlock *Preheader = getCurPreheader(); in HoistRegion() local
626 if (!Preheader) in HoistRegion()
633 InitRegPressure(Preheader); in HoistRegion()
644 if (!Hoist(MI, Preheader)) in HoistRegion()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
DLoopIdiomRecognize.cpp473 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStridedStore() local
474 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore()
485 Preheader->getTerminator()); in processLoopStridedStore()
511 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStridedStore()
562 BasicBlock *Preheader = CurLoop->getLoopPreheader(); in processLoopStoreOfLoopLoad() local
563 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
575 Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
591 Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
617 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
DLICM.cpp101 BasicBlock *Preheader; // The preheader block of the current loop... member
217 Preheader = L->getLoopPreheader(); in runOnLoop()
242 if (Preheader) in runOnLoop()
247 if (!DisablePromotion && Preheader && L->hasDedicatedExits()) { in runOnLoop()
256 Preheader = 0; in runOnLoop()
564 DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " in hoist()
568 I.moveBefore(Preheader->getTerminator()); in hoist()
792 Preheader->getTerminator()); in PromoteAliasSet()
795 SSA.AddAvailableValue(Preheader, PreheaderLoad); in PromoteAliasSet()
DLoopDeletion.cpp41 bool &Changed, BasicBlock *Preheader);
80 bool &Changed, BasicBlock *Preheader) { in IsLoopDead() argument
102 if (!L->makeLoopInvariant(I, Changed, Preheader->getTerminator())) in IsLoopDead()
/external/llvm/lib/Target/PowerPC/
DPPCCTRLoops.cpp566 BasicBlock *Preheader = L->getLoopPreheader(); in convertToCTRLoop() local
572 if (!Preheader || mightUseCTR(TT, Preheader)) in convertToCTRLoop()
573 Preheader = InsertPreheaderForLoop(L, DT, LI, PreserveLCSSA); in convertToCTRLoop()
574 if (!Preheader) in convertToCTRLoop()
577 DEBUG(dbgs() << "Preheader for exit count: " << Preheader->getName() << "\n"); in convertToCTRLoop()
583 SCEVExpander SCEVE(*SE, Preheader->getModule()->getDataLayout(), "loopcnt"); in convertToCTRLoop()
592 SCEVE.expandCodeFor(ExitCount, CountType, Preheader->getTerminator()); in convertToCTRLoop()
594 IRBuilder<> CountBuilder(Preheader->getTerminator()); in convertToCTRLoop()
595 Module *M = Preheader->getParent()->getParent(); in convertToCTRLoop()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/PowerPC/
DPPCCTRLoops.cpp634 BasicBlock *Preheader = L->getLoopPreheader(); in convertToCTRLoop() local
640 if (!Preheader || mightUseCTR(Preheader)) in convertToCTRLoop()
641 Preheader = InsertPreheaderForLoop(L, DT, LI, PreserveLCSSA); in convertToCTRLoop()
642 if (!Preheader) in convertToCTRLoop()
645 LLVM_DEBUG(dbgs() << "Preheader for exit count: " << Preheader->getName() in convertToCTRLoop()
660 SCEVE.expandCodeFor(ExitCount, CountType, Preheader->getTerminator()); in convertToCTRLoop()
662 IRBuilder<> CountBuilder(Preheader->getTerminator()); in convertToCTRLoop()
663 Module *M = Preheader->getParent()->getParent(); in convertToCTRLoop()
/external/swiftshader/third_party/llvm-7.0/llvm/test/Other/
Dloop-pass-printer.ll16 ; DEL: ; Preheader:
25 ; DEL: ; Preheader:
34 ; BAR: ; Preheader:
/external/llvm/lib/Target/Hexagon/
DHexagonHardwareLoops.cpp388 MachineBasicBlock *Preheader = L->getLoopPreheader(); in findInductionRegister() local
391 if (!Header || !Preheader || !Latch || !ExitingBlock) in findInductionRegister()
569 MachineBasicBlock *Preheader = L->getLoopPreheader(); in getLoopTripCount() local
576 if (MBB == Preheader) in getLoopTripCount()
1156 MachineBasicBlock *Preheader = L->getLoopPreheader(); in convertToHardwareLoop() local
1157 if (!Preheader) { in convertToHardwareLoop()
1158 Preheader = createPreheaderForLoop(L); in convertToHardwareLoop()
1159 if (!Preheader) in convertToHardwareLoop()
1163 MachineBasicBlock::iterator InsertPos = Preheader->getFirstTerminator(); in convertToHardwareLoop()
1177 if (!MDT->dominates(BBDef, Preheader)) in convertToHardwareLoop()
[all …]
/external/swiftshader/third_party/llvm-7.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()
1195 MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); in convertToHardwareLoop() local
1196 if (!Preheader) { in convertToHardwareLoop()
1197 Preheader = createPreheaderForLoop(L); in convertToHardwareLoop()
1198 if (!Preheader) in convertToHardwareLoop()
1202 MachineBasicBlock::iterator InsertPos = Preheader->getFirstTerminator(); in convertToHardwareLoop()
1216 if (!MDT->dominates(BBDef, Preheader)) in convertToHardwareLoop()
[all …]

123