/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | LoopUtils.h | 34 class Loop; variable 55 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, 63 bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, 102 bool formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 114 bool formLCSSARecursively(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 125 Loop &L, MemorySSA &MSSA); 127 SinkAndHoistLICMFlags(bool IsSink, Loop &L, MemorySSA &MSSA); 154 TargetLibraryInfo *, TargetTransformInfo *, Loop *CurLoop, 157 Loop *OutermostLoop = nullptr); 163 TargetTransformInfo *, Loop *, MemorySSAUpdater &, [all …]
|
H A D | UnrollLoop.h | 31 class Loop; variable 40 using NewLoopsMap = SmallDenseMap<const Loop *, Loop *, 4>; 51 const Loop* addClonedBlockToLoopInfo(BasicBlock *OriginalBB, 80 LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, 85 Loop **RemainderLoop = nullptr, 89 Loop *L, unsigned Count, bool AllowExpensiveTripCount, 93 Loop **ResultLoop = nullptr); 95 LoopUnrollResult UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, 101 Loop **EpilogueLoop = nullptr); 103 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;
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | LoopInfo.h | 33 class Loop; variable 40 extern template class LoopBase<BasicBlock, Loop>; 44 class LLVM_EXTERNAL_VISIBILITY Loop : public LoopBase<BasicBlock, Loop> { 165 static std::optional<Loop::LoopBounds> 166 getBounds(const Loop &L, PHINode &IndVar, ScalarEvolution &SE); 226 LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F, in LoopBounds() 228 : L(Loop), InitialIVValue(I), StepInst(SI), StepValue(SV), in LoopBounds() 231 const Loop &L; 401 Loop() = default; 403 friend class LoopInfoBase<BasicBlock, Loop>; [all …]
|
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 *getInnermostLoo [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 *, unsigne [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 *LoopNes [all...] |
H A D | ScalarEvolution.h | 58 class Loop; variable 615 const SCEV *getAddRecExpr(const SCEV *Start, const SCEV *Step, const Loop *L, 618 const Loop *L, SCEV::NoWrapFlags Flags); 620 const Loop *L, SCEV::NoWrapFlags Flags) { 776 const SCEV *getSCEVAtScope(const SCEV *S, const Loop *L); 779 const SCEV *getSCEVAtScope(Value *V, const Loop *L); 784 bool isLoopEntryGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 795 bool isLoopBackedgeGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 810 const Loop *L); 816 unsigned getSmallConstantTripCount(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 | 63 class Loop; variable 281 LoopData *Loop = nullptr; ///< The loop this block is inside. member 286 bool isLoopHeader() const { return Loop && Loop->isHeader(Node); } in isLoopHeader() 289 return isLoopHeader() && Loop->Parent && Loop->Parent->isIrreducible() && in isDoubleLoopHeader() 290 Loop->Parent->isHeader(Node); in isDoubleLoopHeader() 295 return Loop; in getContainingLoop() 297 return Loop->Parent; in getContainingLoop() 298 return Loop->Parent->Parent; in getContainingLoop() 320 if (!Loop || !Loop->IsPackaged) in getPackagedLoop() 322 auto *L = Loop; in getPackagedLoop() [all …]
|
H A D | LoopAnalysisManager.h | 42 class Loop; variable 67 extern template class AllAnalysesOn<Loop>; 69 extern template class AnalysisManager<Loop, LoopStandardAnalysisResults &>; 76 typedef AnalysisManager<Loop, LoopStandardAnalysisResults &> 153 extern template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop, 156 typedef OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop,
|
H A D | IVDescriptors.h | 27 class Loop; 121 /// variable of type 'Kind' for a Loop \p L and reduction PHI \p Phi. 126 static InstDesc isRecurrenceInstr(Loop *L, PHINode *Phi, Instruction *I, 152 static InstDesc isAnyOfPattern(Loop *Loop, PHINode *OrigPhi, Instruction *I, 170 AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop, 181 isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes, 194 static bool isFixedOrderRecurrence(PHINode *Phi, Loop *TheLoop, 265 Loop *L) const; 336 isInductionPHI(PHINode *Phi, const Loop * 28 class Loop; global() variable [all...] |
/freebsd/contrib/llvm-project/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 …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
H A D | LoopPassManager.h | 60 std::declval<Loop &>(), std::declval<LoopAnalysisManager &>(), 70 class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 73 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 94 PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, 110 detail::PassModel<Loop, PassT, LoopAnalysisManager, in addPass() 142 detail::PassConcept<Loop, LoopAnalysisManager, 163 PreservedAnalyses runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 166 PreservedAnalyses runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 171 static const Loop &getLoopFromIR(Loop &L) { return L; } in getLoopFromIR() 172 static const Loop &getLoopFromIR(LoopNest &LN) { in getLoopFromIR() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | LoopInfo.cpp | 44 template class llvm::LoopBase<BasicBlock, Loop>; 45 template class llvm::LoopInfoBase<BasicBlock, Loop>; 61 bool Loop::isLoopInvariant(const Value *V) const { in isLoopInvariant() 67 bool Loop::hasLoopInvariantOperands(const Instruction *I) const { in hasLoopInvariantOperands() 71 bool Loop::makeLoopInvariant(Value *V, bool &Changed, Instruction *InsertPt, in makeLoopInvariant() 79 bool Loop::makeLoopInvariant(Instruction *I, bool &Changed, in makeLoopInvariant() 125 bool Loop::getIncomingAndBackEdge(BasicBlock *&Incoming, in getIncomingAndBackEdge() 151 PHINode *Loop::getCanonicalInductionVariable() const { in getCanonicalInductionVariable() 175 ICmpInst *Loop::getLatchCmpInst() const { in getLatchCmpInst() 185 static Value *findFinalIVValue(const Loop &L, const PHINode &IndVar, in findFinalIVValue() [all …]
|
H A D | BlockFrequencyInfoImpl.cpp | 375 const LoopData *OuterLoop, LoopData &Loop, Distribution &Dist) { in addLoopSuccessorsToDist() argument 377 for (const auto &I : Loop.Exits) in addLoopSuccessorsToDist() 378 if (!addToDist(Dist, OuterLoop, Loop.getHeader(), I.first, in addLoopSuccessorsToDist() 387 void BlockFrequencyInfoImplBase::computeLoopScale(LoopData &Loop) { in computeLoopScale() argument 389 LLVM_DEBUG(dbgs() << "compute-loop-scale: " << getLoopName(Loop) << "\n"); in computeLoopScale() 405 for (auto &Mass : Loop.BackedgeMass) in computeLoopScale() 412 Loop.Scale = in computeLoopScale() 418 << " - scale = " << Loop.Scale << "\n"); in computeLoopScale() 422 void BlockFrequencyInfoImplBase::packageLoop(LoopData &Loop) { in packageLoop() argument 423 LLVM_DEBUG(dbgs() << "packaging-loop: " << getLoopName(Loop) << "\n"); in packageLoop() [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 | 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()
|
H A D | LoopCacheAnalysis.cpp | 62 static Loop *getInnerMostLoop(const LoopVectorTy &Loops) { in getInnerMostLoop() 65 Loop *LastLoop = Loops.back(); in getInnerMostLoop() 66 Loop *ParentLoop = LastLoop->getParentLoop(); in getInnerMostLoop() 74 [](const Loop *L1, const Loop *L2) { in getInnerMostLoop() 82 const Loop &L, ScalarEvolution &SE) { in isOneDimensionalArray() 109 static const SCEV *computeTripCount(const Loop &L, const SCEV &ElemSize, in computeTripCount() 216 unsigned MaxDistance, const Loop &L, in hasTemporalReuse() 272 CacheCostTy IndexedReference::computeRefCost(const Loop &L, in computeRefCost() 380 if (Loop *L = LI.getLoopFor(BB)) { in delinearize() 450 bool IndexedReference::isLoopInvariant(const Loop &L) const { in isLoopInvariant() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LoopInterchange.cpp | 62 using LoopVector = SmallVector<Loop *, 8>; 86 Loop *L, DependenceInfo *DI, in populateDependencyMatrix() 215 static void populateWorklist(Loop &L, LoopVector &LoopList) { in populateWorklist() 220 Loop *CurrentLoop = &L; in populateWorklist() 221 const std::vector<Loop *> *Vec = &CurrentLoop->getSubLoops(); in populateWorklist() 243 LoopInterchangeLegality(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeLegality() 253 bool findInductions(Loop *L, SmallVectorImpl<PHINode *> &Inductions); 270 bool tightlyNested(Loop *Outer, Loop *Inner); 277 bool findInductionAndReductions(Loop *L, 279 Loop *InnerLoop); [all …]
|
H A D | LoopPassManager.cpp | 1 //===- LoopPassManager.cpp - Loop pass management -------------------------===// 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() 72 "Loop-nest passes should only run on top-level loops."); in runWithLoopNestPasses() 87 Loop *OuterMostLoop = &L; in runWithLoopNestPasses() 147 // Run all loop passes on loop \p L. Loop-nest passes don't run either because 151 LoopPassManager::runWithoutLoopNestPasses(Loop [all...] |
H A D | SimpleLoopUnswitch.cpp | 193 collectHomogenousInstGraphLoopInvariants(const Loop &L, Instruction &Root, in collectHomogenousInstGraphLoopInvariants() 235 static void replaceLoopInvariantUses(const Loop &L, Value *Invariant, in replaceLoopInvariantUses() 252 static bool areLoopExitPHIsLoopInvariant(const Loop &L, in areLoopExitPHIsLoopInvariant() 294 BasicBlock &UnswitchedSucc, BasicBlock &NormalSucc, Loop &L, in buildPartialInvariantUnswitchConditionalBranch() 409 static void hoistLoopToNewParent(Loop &L, BasicBlock &Preheader, in hoistLoopToNewParent() 413 Loop *OldParentL = L.getParentLoop(); in hoistLoopToNewParent() 419 Loop *NewParentL = nullptr; in hoistLoopToNewParent() 421 if (Loop *ExitL = LI.getLoopFor(ExitBB)) in hoistLoopToNewParent() 451 for (Loop *OldContainingL = OldParentL; OldContainingL != NewParentL; in hoistLoopToNewParent() 480 static Loop *getTopMostExitingLoo [all...] |
/freebsd/contrib/llvm-project/clang/lib/AST/ |
H A D | StmtOpenACC.cpp | 71 OpenACCLoopConstructClass, OpenACCDirectiveKind::Loop, in OpenACCLoopConstruct() 83 ArrayRef<const OpenACCClause *> Clauses, Stmt *Loop) in OpenACCLoopConstruct() argument 85 OpenACCDirectiveKind::Loop, Start, DirLoc, in OpenACCLoopConstruct() 86 End, Loop) { in OpenACCLoopConstruct() 89 assert((Loop == nullptr || isa<ForStmt, CXXForRangeStmt>(Loop)) && in OpenACCLoopConstruct() 99 void OpenACCLoopConstruct::setLoop(Stmt *Loop) { in setLoop() argument 100 assert((isa<ForStmt, CXXForRangeStmt>(Loop)) && in setLoop() 102 setAssociatedStmt(Loop); in setLoop() 118 Stmt *Loop) { in Create() argument 123 new (Mem) OpenACCLoopConstruct(BeginLoc, DirLoc, EndLoc, Clauses, Loop); in Create()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | LoopUnrollAndJam.cpp | 69 static bool partitionLoopBlocks(Loop &L, BasicBlockSet &ForeBlocks, in partitionLoopBlocks() 71 Loop *SubLoop = L.getSubLoops()[0]; in partitionLoopBlocks() 101 Loop &Root, Loop &JamLoop, BasicBlockSet &JamLoopBlocks, in partitionOuterLoopBlocks() 102 DenseMap<Loop *, BasicBlockSet> &ForeBlocksMap, in partitionOuterLoopBlocks() argument 103 DenseMap<Loop *, BasicBlockSet> &AftBlocksMap, DominatorTree &DT) { in partitionOuterLoopBlocks() 106 for (Loop *L : Root.getLoopsInPreorder()) { in partitionOuterLoopBlocks() 119 static bool partitionOuterLoopBlocks(Loop *L, Loop *SubLoop, in partitionOuterLoopBlocks() 216 llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, in UnrollAndJamLoop() 220 OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop) { in UnrollAndJamLoop() 226 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 …]
|