| /openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Utils/ |
| H A D | LoopUtils.h | 32 class Loop; variable 53 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, 61 bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, 96 bool formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 108 bool formLCSSARecursively(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 119 Loop *L = nullptr, MemorySSA *MSSA = nullptr); 121 SinkAndHoistLICMFlags(bool IsSink, Loop *L = nullptr, 149 TargetLibraryInfo *, TargetTransformInfo *, Loop *CurLoop, 152 Loop *OutermostLoop = nullptr); 158 TargetTransformInfo *, Loop *, MemorySSAUpdater &, [all …]
|
| H A D | UnrollLoop.h | 29 class Loop; variable 38 using NewLoopsMap = SmallDenseMap<const Loop *, Loop *, 4>; 49 const Loop* addClonedBlockToLoopInfo(BasicBlock *OriginalBB, 77 LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, 82 Loop **RemainderLoop = nullptr); 85 Loop *L, unsigned Count, bool AllowExpensiveTripCount, 89 Loop **ResultLoop = nullptr); 91 LoopUnrollResult UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, 97 Loop **EpilogueLoop = nullptr); 99 bool isSafeToUnrollAndJam(Loop *L, ScalarEvolution &SE, DominatorTree &DT, [all …]
|
| H A D | LoopVersioning.h | 24 class Loop; variable 48 ArrayRef<RuntimePointerCheck> Checks, Loop *L, LoopInfo *LI, 73 Loop *getVersionedLoop() { return VersionedLoop; } in getVersionedLoop() 77 Loop *getNonVersionedLoop() { return NonVersionedLoop; } in getNonVersionedLoop() 114 Loop *VersionedLoop; 117 Loop *NonVersionedLoop = nullptr;
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/ |
| H A D | MachineLoopUtils.cpp | 27 MachineBasicBlock *Loop, in PeelSingleBlockLoop() argument 30 MachineFunction &MF = *Loop->getParent(); in PeelSingleBlockLoop() 31 MachineBasicBlock *Preheader = *Loop->pred_begin(); in PeelSingleBlockLoop() 32 if (Preheader == Loop) in PeelSingleBlockLoop() 33 Preheader = *std::next(Loop->pred_begin()); in PeelSingleBlockLoop() 34 MachineBasicBlock *Exit = *Loop->succ_begin(); in PeelSingleBlockLoop() 35 if (Exit == Loop) in PeelSingleBlockLoop() 36 Exit = *std::next(Loop->succ_begin()); in PeelSingleBlockLoop() 38 MachineBasicBlock *NewBB = MF.CreateMachineBasicBlock(Loop->getBasicBlock()); in PeelSingleBlockLoop() 40 MF.insert(Loop->getIterator(), NewBB); in PeelSingleBlockLoop() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/ |
| H A D | LoopNestAnalysis.h | 23 using LoopVectorTy = SmallVector<Loop *, 8>; 33 LoopNest(Loop &Root, ScalarEvolution &SE); 38 static std::unique_ptr<LoopNest> getLoopNest(Loop &Root, ScalarEvolution &SE); 51 static bool arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop, 56 static InstrVectorTy getInterveningInstructions(const Loop &OuterLoop, 57 const Loop &InnerLoop, 69 static unsigned getMaxPerfectDepth(const Loop &Root, ScalarEvolution &SE); 80 Loop &getOutermostLoop() const { return *Loops.front(); } in getOutermostLoop() 85 Loop *getInnermostLoop() const { in getInnermostLoop() 92 Loop *LastLoop = Loops.back(); in getInnermostLoop() [all …]
|
| H A D | LoopCacheAnalysis.h | 29 class Loop; variable 35 using LoopVectorTy = SmallVector<Loop *, 8>; 84 unsigned MaxDistance, const Loop &L, 96 CacheCostTy computeRefCost(const Loop &L, unsigned CLS) const; 107 bool isLoopInvariant(const Loop &L) const; 114 bool isConsecutive(const Loop &L, const SCEV *&Stride, unsigned CLS) const; 121 int getSubscriptIndex(const Loop &L) const; 129 const Loop &L) const; 133 bool isSimpleAddRecurrence(const SCEV &Subscript, const Loop &L) const; 191 using LoopTripCountTy = std::pair<const Loop *, unsigned>; [all …]
|
| H A D | ScalarEvolution.h | 58 class Loop; variable 610 const SCEV *getAddRecExpr(const SCEV *Start, const SCEV *Step, const Loop *L, 613 const Loop *L, SCEV::NoWrapFlags Flags); 615 const Loop *L, SCEV::NoWrapFlags Flags) { 767 const SCEV *getSCEVAtScope(const SCEV *S, const Loop *L); 770 const SCEV *getSCEVAtScope(Value *V, const Loop *L); 775 bool isLoopEntryGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 786 bool isLoopBackedgeGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 804 unsigned getSmallConstantTripCount(const Loop *L); 815 unsigned getSmallConstantTripCount(const Loop *L, [all …]
|
| H A D | DependenceAnalysis.h | 50 class Loop; variable 412 const Loop *AssociatedLoop; 457 const Loop *getAssociatedLoop() const; 460 void setPoint(const SCEV *X, const SCEV *Y, const Loop *CurrentLoop); 464 const SCEV *C, const Loop *CurrentLoop); 467 void setDistance(const SCEV *D, const Loop *CurrentLoop); 537 unsigned mapSrcLoop(const Loop *SrcLoop) const; 541 unsigned mapDstLoop(const Loop *DstLoop) const; 545 bool isLoopInvariant(const SCEV *Expression, const Loop *LoopNest) const; 562 const Loop *LoopNest, [all …]
|
| H A D | LoopInfo.h | 61 class Loop; variable 537 raw_ostream &operator<<(raw_ostream &OS, const LoopBase<BlockT, LoopT> &Loop) { 538 Loop.print(OS); 543 extern template class LoopBase<BasicBlock, Loop>; 547 class LLVM_EXTERNAL_VISIBILITY Loop : public LoopBase<BasicBlock, Loop> { 668 static std::optional<Loop::LoopBounds> 669 getBounds(const Loop &L, PHINode &IndVar, ScalarEvolution &SE); 729 LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F, in LoopBounds() 731 : L(Loop), InitialIVValue(I), StepInst(SI), StepValue(SV), in LoopBounds() 734 const Loop &L; [all …]
|
| H A D | LoopPass.h | 23 class Loop; variable 39 virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0; 45 virtual bool doInitialization(Loop *L, LPPassManager &LPM) { in doInitialization() 73 bool skipLoop(const Loop *L) const; 109 void addLoop(Loop &L); 112 void markLoopAsDeleted(Loop &L); 115 std::deque<Loop *> LQ; 117 Loop *CurrentLoop;
|
| H A D | BlockFrequencyInfoImpl.h | 62 class Loop; variable 280 LoopData *Loop = nullptr; ///< The loop this block is inside. member 285 bool isLoopHeader() const { return Loop && Loop->isHeader(Node); } in isLoopHeader() 288 return isLoopHeader() && Loop->Parent && Loop->Parent->isIrreducible() && in isDoubleLoopHeader() 289 Loop->Parent->isHeader(Node); in isDoubleLoopHeader() 294 return Loop; in getContainingLoop() 296 return Loop->Parent; in getContainingLoop() 297 return Loop->Parent->Parent; in getContainingLoop() 319 if (!Loop || !Loop->IsPackaged) in getPackagedLoop() 321 auto L = Loop; in getPackagedLoop() [all …]
|
| H A D | DivergenceAnalysis.h | 26 class Loop; variable 45 DivergenceAnalysisImpl(const Function &F, const Loop *RegionLoop, 50 const Loop *getRegionLoop() const { return RegionLoop; } in getRegionLoop() 96 const Loop &DivLoop); 100 const Loop &OuterDivLoop); 105 const Loop &OuterDivLoop); 118 const Loop *RegionLoop; 124 DenseSet<const Loop *> DivergentLoops;
|
| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | LoopInfo.cpp | 43 template class llvm::LoopBase<BasicBlock, Loop>; 44 template class llvm::LoopInfoBase<BasicBlock, Loop>; 60 bool Loop::isLoopInvariant(const Value *V) const { in isLoopInvariant() 66 bool Loop::hasLoopInvariantOperands(const Instruction *I) const { in hasLoopInvariantOperands() 70 bool Loop::makeLoopInvariant(Value *V, bool &Changed, Instruction *InsertPt, in makeLoopInvariant() 78 bool Loop::makeLoopInvariant(Instruction *I, bool &Changed, in makeLoopInvariant() 124 bool Loop::getIncomingAndBackEdge(BasicBlock *&Incoming, in getIncomingAndBackEdge() 150 PHINode *Loop::getCanonicalInductionVariable() const { in getCanonicalInductionVariable() 174 ICmpInst *Loop::getLatchCmpInst() const { in getLatchCmpInst() 184 static Value *findFinalIVValue(const Loop &L, const PHINode &IndVar, in findFinalIVValue() [all …]
|
| H A D | LoopNestAnalysis.cpp | 35 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, 42 LoopNest::LoopNest(Loop &Root, ScalarEvolution &SE) in LoopNest() 47 std::unique_ptr<LoopNest> LoopNest::getLoopNest(Loop &Root, in getLoopNest() 52 static CmpInst *getOuterLoopLatchCmp(const Loop &OuterLoop) { in getOuterLoopLatchCmp() 70 static CmpInst *getInnerLoopGuardCmp(const Loop &InnerLoop) { in getInnerLoopGuardCmp() 87 std::optional<Loop::LoopBounds> OuterLoopLB) { in checkSafeInstruction() 103 bool LoopNest::arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop, in arePerfectlyNested() 110 const Loop &OuterLoop, const Loop &InnerLoop, ScalarEvolution &SE) { in analyzeLoopNestForPerfectNest() 182 const Loop &OuterLoop, const Loop &InnerLoop, ScalarEvolution &SE) { in getInterveningInstructions() 245 for (Loop *L : depth_first(const_cast<Loop *>(Loops.front()))) { in getPerfectLoops() [all …]
|
| H A D | BlockFrequencyInfoImpl.cpp | 374 const LoopData *OuterLoop, LoopData &Loop, Distribution &Dist) { in addLoopSuccessorsToDist() argument 376 for (const auto &I : Loop.Exits) in addLoopSuccessorsToDist() 377 if (!addToDist(Dist, OuterLoop, Loop.getHeader(), I.first, in addLoopSuccessorsToDist() 386 void BlockFrequencyInfoImplBase::computeLoopScale(LoopData &Loop) { in computeLoopScale() argument 388 LLVM_DEBUG(dbgs() << "compute-loop-scale: " << getLoopName(Loop) << "\n"); in computeLoopScale() 404 for (auto &Mass : Loop.BackedgeMass) in computeLoopScale() 411 Loop.Scale = in computeLoopScale() 417 << " - scale = " << Loop.Scale << "\n"); in computeLoopScale() 421 void BlockFrequencyInfoImplBase::packageLoop(LoopData &Loop) { in packageLoop() argument 422 LLVM_DEBUG(dbgs() << "packaging-loop: " << getLoopName(Loop) << "\n"); in packageLoop() [all …]
|
| H A D | SyncDependenceAnalysis.cpp | 155 static void computeLoopPO(const LoopInfo &LI, Loop &Loop, POCB CallBack, 159 static void computeStackPO(BlockStack &Stack, const LoopInfo &LI, Loop *Loop, in computeStackPO() argument 161 const auto *LoopHeader = Loop ? Loop->getHeader() : nullptr; in computeStackPO() 166 bool IsNestedLoop = NestedLoop != Loop; in computeStackPO() 176 if (Loop && !Loop->contains(NestedExitBB)) in computeStackPO() 196 if (Loop && !Loop->contains(SuccBB)) in computeStackPO() 221 static void computeLoopPO(const LoopInfo &LI, Loop &Loop, POCB CallBack, in computeLoopPO() argument 225 const auto *LoopHeader = Loop.getHeader(); in computeLoopPO() 233 if (!Loop.contains(BB)) in computeLoopPO() 241 computeStackPO(Stack, LI, &Loop, CallBack, Finalized); in computeLoopPO()
|
| H A D | DivergenceAnalysis.cpp | 93 const Function &F, const Loop *RegionLoop, const DominatorTree &DT, in DivergenceAnalysisImpl() 117 for (const auto *Loop = LI.getLoopFor(Inst->getParent()); in isTemporalDivergent() local 118 Loop != RegionLoop && !Loop->contains(&ObservingBlock); in isTemporalDivergent() 119 Loop = Loop->getParentLoop()) { in isTemporalDivergent() 120 if (DivergentLoops.contains(Loop)) in isTemporalDivergent() 159 const Loop &DivLoop) { in getIfCarriedInstruction() 169 const Instruction &I, const Loop &OuterDivLoop) { in analyzeTemporalDivergence() 191 const BasicBlock &DivExit, const Loop &OuterDivLoop) { in analyzeLoopExitDivergence() 245 const BasicBlock &DivExit, const Loop &InnerDivLoop) { in propagateLoopExitDivergence() 249 const Loop *DivLoop = &InnerDivLoop; in propagateLoopExitDivergence() [all …]
|
| H A D | LoopAnalysisManager.cpp | 23 template class AllAnalysesOn<Loop>; 24 template class AnalysisManager<Loop, LoopStandardAnalysisResults &>; 26 template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop, 37 SmallVector<Loop *, 4> PreOrderLoops = LI->getLoopsInReverseSiblingPreorder(); in invalidate() 63 for (Loop *L : PreOrderLoops) { in invalidate() 85 PA.allAnalysesInSetPreserved<AllAnalysesOn<Loop>>(); in invalidate() 93 for (Loop *L : reverse(PreOrderLoops)) { in invalidate()
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Scalar/ |
| H A D | LoopPassManager.h | 59 std::declval<Loop &>(), std::declval<LoopAnalysisManager &>(), 69 class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 72 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 93 PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, 109 detail::PassModel<Loop, PassT, PreservedAnalyses, LoopAnalysisManager, in addPass() 141 detail::PassModel<Loop, RepeatedPass<PassT>, PreservedAnalyses, in addPass() 175 detail::PassConcept<Loop, LoopAnalysisManager, 196 PreservedAnalyses runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 199 PreservedAnalyses runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 204 static const Loop &getLoopFromIR(Loop &L) { return L; } in getLoopFromIR() [all …]
|
| /openbsd-src/gnu/llvm/llvm/tools/llvm-exegesis/lib/ |
| H A D | SnippetRepetitor.cpp | 74 auto Loop = Filler.addBasicBlock(); in Repeat() local 93 Entry.MBB->addSuccessor(Loop.MBB, BranchProbability::getOne()); in Repeat() 94 Loop.MBB->addSuccessor(Loop.MBB, BranchProbability::getOne()); in Repeat() 96 if (Loop.MF.getProperties().hasProperty( in Repeat() 100 Loop.MBB->addLiveIn(LoopCounter); in Repeat() 102 Loop.MBB->addLiveIn(Reg); in Repeat() 104 Loop.MBB->addLiveIn(LiveIn); in Repeat() 108 Loop.addInstructions(Instructions); in Repeat() 110 ET.decrementLoopCounterAndJump(*Loop.MBB, *Loop.MBB, in Repeat() 114 Loop.MBB->addSuccessor(Exit.MBB, BranchProbability::getZero()); in Repeat() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/ |
| H A D | LoopInterchange.cpp | 66 using LoopVector = SmallVector<Loop *, 8>; 90 Loop *L, DependenceInfo *DI, in populateDependencyMatrix() 220 static void populateWorklist(Loop &L, LoopVector &LoopList) { in populateWorklist() 225 Loop *CurrentLoop = &L; in populateWorklist() 226 const std::vector<Loop *> *Vec = &CurrentLoop->getSubLoops(); in populateWorklist() 248 LoopInterchangeLegality(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeLegality() 258 bool findInductions(Loop *L, SmallVectorImpl<PHINode *> &Inductions); 275 bool tightlyNested(Loop *Outer, Loop *Inner); 282 bool findInductionAndReductions(Loop *L, 284 Loop *InnerLoop); [all …]
|
| H A D | LoopPassManager.cpp | 26 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 27 LPMUpdater &>::run(Loop &L, LoopAnalysisManager &AM, in run() 41 PA.preserveSet<AllAnalysesOn<Loop>>(); in run() 46 void PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 68 LoopPassManager::runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithLoopNestPasses() 87 Loop *OuterMostLoop = &L; in runWithLoopNestPasses() 151 LoopPassManager::runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithoutLoopNestPasses() 253 SmallPriorityWorklist<Loop *, 4> Worklist; in run() 264 for (Loop *L : LI) in run() 272 assert(any_cast<const Loop *>(&IR) || any_cast<const LoopNest *>(&IR)); in run() [all …]
|
| H A D | SimpleLoopUnswitch.cpp | 151 collectHomogenousInstGraphLoopInvariants(const Loop &L, Instruction &Root, in collectHomogenousInstGraphLoopInvariants() 193 static void replaceLoopInvariantUses(const Loop &L, Value *Invariant, in replaceLoopInvariantUses() 210 static bool areLoopExitPHIsLoopInvariant(const Loop &L, in areLoopExitPHIsLoopInvariant() 252 BasicBlock &UnswitchedSucc, BasicBlock &NormalSucc, Loop &L, in buildPartialInvariantUnswitchConditionalBranch() 366 static void hoistLoopToNewParent(Loop &L, BasicBlock &Preheader, in hoistLoopToNewParent() 370 Loop *OldParentL = L.getParentLoop(); in hoistLoopToNewParent() 376 Loop *NewParentL = nullptr; in hoistLoopToNewParent() 378 if (Loop *ExitL = LI.getLoopFor(ExitBB)) in hoistLoopToNewParent() 408 for (Loop *OldContainingL = OldParentL; OldContainingL != NewParentL; in hoistLoopToNewParent() 437 static const Loop *getTopMostExitingLoop(const BasicBlock *ExitBB, in getTopMostExitingLoop() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/ |
| H A D | LoopUnrollAndJam.cpp | 70 static bool partitionLoopBlocks(Loop &L, BasicBlockSet &ForeBlocks, in partitionLoopBlocks() 72 Loop *SubLoop = L.getSubLoops()[0]; in partitionLoopBlocks() 102 Loop &Root, Loop &JamLoop, BasicBlockSet &JamLoopBlocks, in partitionOuterLoopBlocks() 103 DenseMap<Loop *, BasicBlockSet> &ForeBlocksMap, in partitionOuterLoopBlocks() argument 104 DenseMap<Loop *, BasicBlockSet> &AftBlocksMap, DominatorTree &DT) { in partitionOuterLoopBlocks() 107 for (Loop *L : Root.getLoopsInPreorder()) { in partitionOuterLoopBlocks() 120 static bool partitionOuterLoopBlocks(Loop *L, Loop *SubLoop, in partitionOuterLoopBlocks() 217 llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, in UnrollAndJamLoop() 221 OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop) { in UnrollAndJamLoop() 227 Loop *SubLoop = *L->begin(); in UnrollAndJamLoop() [all …]
|
| H A D | LoopUtils.cpp | 57 bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, in formDedicatedExitBlocks() 123 SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) { in findDefsUsedOutsideOfLoop() 203 static MDNode *createStringMetadata(Loop *TheLoop, StringRef Name, unsigned V) { in createStringMetadata() 214 void llvm::addStringMetadataToLoop(Loop *TheLoop, const char *StringMD, in addStringMetadataToLoop() 250 llvm::getOptionalElementCountLoopAttribute(const Loop *TheLoop) { in getOptionalElementCountLoopAttribute() 344 bool llvm::hasDisableAllTransformsHint(const Loop *L) { in hasDisableAllTransformsHint() 348 bool llvm::hasDisableLICMTransformsHint(const Loop *L) { in hasDisableLICMTransformsHint() 352 TransformationMode llvm::hasUnrollTransformation(const Loop *L) { in hasUnrollTransformation() 373 TransformationMode llvm::hasUnrollAndJamTransformation(const Loop *L) { in hasUnrollAndJamTransformation() 391 TransformationMode llvm::hasVectorizeTransformation(const Loop *L) { in hasVectorizeTransformation() [all …]
|