Home
last modified time | relevance | path

Searched refs:Loop (Results 1 – 25 of 370) sorted by relevance

12345678910>>...15

/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DLoopUtils.h34 class Loop; variable
55 LLVM_ABI BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT,
65 LLVM_ABI bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI,
106 LLVM_ABI bool formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI,
118 LLVM_ABI bool formLCSSARecursively(Loop &L, const DominatorTree &DT,
129 bool IsSink, Loop &L, MemorySSA &MSSA);
131 LLVM_ABI SinkAndHoistLICMFlags(bool IsSink, Loop &L, MemorySSA &MSSA);
159 TargetTransformInfo *, Loop *CurLoop,
162 Loop *OutermostLoop = nullptr);
168 TargetTransformInfo *, Loop *,
[all …]
H A DUnrollLoop.h32 class Loop; variable
41 using NewLoopsMap = SmallDenseMap<const Loop *, Loop *, 4>;
52 LLVM_ABI const Loop *addClonedBlockToLoopInfo(BasicBlock *OriginalBB,
84 LLVM_ABI LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO,
90 Loop **RemainderLoop = nullptr,
94 Loop *L, unsigned Count, bool AllowExpensiveTripCount,
99 Loop **ResultLoop = nullptr);
102 Loop *L, unsigned Count, unsigned TripCount, unsigned TripMultiple,
105 OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop = nullptr);
107 LLVM_ABI bool isSafeToUnrollAndJam(Loop *L, ScalarEvolution &SE,
[all …]
H A DLoopVersioning.h24 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()
119 Loop *VersionedLoop;
122 Loop *NonVersionedLoop = nullptr;
H A DLoopPeel.h22 bool canPeel(const Loop *L);
27 bool canPeelLastIteration(const Loop &L, ScalarEvolution &SE);
33 bool peelLoop(Loop *L, unsigned PeelCount, bool PeelLast, LoopInfo *LI,
38 gatherPeelingPreferences(Loop *L, ScalarEvolution &SE,
44 void computePeelCount(Loop *L, unsigned LoopSize,
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DLoopInfo.h30 class Loop; variable
36 extern template class LLVM_TEMPLATE_ABI LoopBase<BasicBlock, Loop>;
40 class LLVM_ABI Loop : public LoopBase<BasicBlock, Loop> {
161 LLVM_ABI static std::optional<Loop::LoopBounds>
162 getBounds(const Loop &L, PHINode &IndVar, ScalarEvolution &SE);
222 LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F, in LoopBounds()
224 : L(Loop), InitialIVValue(I), StepInst(SI), StepValue(SV), in LoopBounds()
227 const Loop &L;
397 Loop() = default;
399 friend class LoopInfoBase<BasicBlock, Loop>;
[all …]
H A DLoopNestAnalysis.h24 using LoopVectorTy = SmallVector<Loop *, 8>;
34 LoopNest(Loop &Root, ScalarEvolution &SE);
39 static std::unique_ptr<LoopNest> getLoopNest(Loop &Root, ScalarEvolution &SE);
52 static bool arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop,
57 static InstrVectorTy getInterveningInstructions(const Loop &OuterLoop,
58 const Loop &InnerLoop,
70 static unsigned getMaxPerfectDepth(const Loop &Root, ScalarEvolution &SE);
81 Loop &getOutermostLoop() const { return *Loops.front(); } in getOutermostLoop()
86 Loop *getInnermostLoop() const { in getInnermostLoop()
93 Loop *LastLoop = Loops.back(); in getInnermostLoop()
[all …]
H A DLoopCacheAnalysis.h30 class Loop; variable
36 using LoopVectorTy = SmallVector<Loop *, 8>;
85 unsigned MaxDistance, const Loop &L,
97 CacheCostTy computeRefCost(const Loop &L, unsigned CLS) const;
108 bool isLoopInvariant(const Loop &L) const;
115 bool isConsecutive(const Loop &L, const SCEV *&Stride, unsigned CLS) const;
122 int getSubscriptIndex(const Loop &L) const;
130 const Loop &L) const;
134 bool isSimpleAddRecurrence(const SCEV &Subscript, const Loop &L) const;
192 using LoopTripCountTy = std::pair<const Loop *, unsigned>;
[all …]
H A DDependenceAnalysis.h52 class Loop; variable
426 const Loop *AssociatedLoop;
471 LLVM_ABI const Loop *getAssociatedLoop() const;
475 const Loop *CurrentLoop);
479 const Loop *CurrentLoop);
482 LLVM_ABI void setDistance(const SCEV *D, const Loop *CurrentLoop);
552 unsigned mapSrcLoop(const Loop *SrcLoop) const;
556 unsigned mapDstLoop(const Loop *DstLoop) const;
560 bool isLoopInvariant(const SCEV *Expression, const Loop *LoopNest) const;
577 const Loop *LoopNest,
[all …]
H A DScalarEvolution.h56 class Loop; variable
617 const Loop *L, SCEV::NoWrapFlags Flags);
619 const Loop *L, SCEV::NoWrapFlags Flags);
621 const Loop *L, SCEV::NoWrapFlags Flags) {
783 LLVM_ABI const SCEV *getSCEVAtScope(const SCEV *S, const Loop *L);
786 LLVM_ABI const SCEV *getSCEVAtScope(Value *V, const Loop *L);
791 LLVM_ABI bool isLoopEntryGuardedByCond(const Loop *L, CmpPredicate Pred,
803 LLVM_ABI bool isLoopBackedgeGuardedByCond(const Loop *L, CmpPredicate Pred,
818 Type *EvalTy, const Loop *L);
824 LLVM_ABI unsigned getSmallConstantTripCount(const Loop *L);
[all …]
H A DLoopPass.h24 class Loop; variable
40 virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0;
46 virtual bool doInitialization(Loop *L, LPPassManager &LPM) { in doInitialization()
74 bool skipLoop(const Loop *L) const;
110 void addLoop(Loop &L);
113 void markLoopAsDeleted(Loop &L);
116 std::deque<Loop *> LQ;
118 Loop *CurrentLoop;
H A DScalarEvolutionPatternMatch.h202 inline class_match<const Loop> m_Loop() { return class_match<const Loop>(); } in m_Loop()
208 Loop_t Loop; member
210 SCEVAffineAddRec_match(Op0_t Op0, Op1_t Op1, Loop_t Loop) in SCEVAffineAddRec_match()
211 : Ops(Op0, Op1), Loop(Loop) {} in SCEVAffineAddRec_match()
214 return Ops.match(S) && Loop.match(cast<SCEVAddRecExpr>(S)->getLoop()); in match()
220 const Loop *L;
222 specificloop_ty(const Loop *L) : L(L) {} in specificloop_ty()
224 bool match(const Loop *L) const { return L == this->L; } in match()
227 inline specificloop_ty m_SpecificLoop(const Loop *L) { return L; } in m_SpecificLoop()
229 inline bind_ty<const Loop> m_Loop(const Loop *&L) { return L; } in m_Loop()
[all …]
H A DBlockFrequencyInfoImpl.h63 class Loop; variable
278 LoopData *Loop = nullptr; ///< The loop this block is inside. member
283 bool isLoopHeader() const { return Loop && Loop->isHeader(Node); } in isLoopHeader()
286 return isLoopHeader() && Loop->Parent && Loop->Parent->isIrreducible() && in isDoubleLoopHeader()
287 Loop->Parent->isHeader(Node); in isDoubleLoopHeader()
292 return Loop; in getContainingLoop()
294 return Loop->Parent; in getContainingLoop()
295 return Loop->Parent->Parent; in getContainingLoop()
317 if (!Loop || !Loop->IsPackaged) in getPackagedLoop()
319 auto *L = Loop; in getPackagedLoop()
[all …]
H A DLoopAnalysisManager.h43 class Loop; variable
68 extern template class LLVM_TEMPLATE_ABI AllAnalysesOn<Loop>;
71 AnalysisManager<Loop, LoopStandardAnalysisResults &>;
78 typedef AnalysisManager<Loop, LoopStandardAnalysisResults &>
156 FunctionAnalysisManager, Loop, LoopStandardAnalysisResults &>;
158 typedef OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DMachineLoopUtils.cpp27 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 DLoopPassManager.h61 std::declval<Loop &>(), std::declval<LoopAnalysisManager &>(),
71 class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
74 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
95 LLVM_ABI PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
111 detail::PassModel<Loop, PassT, LoopAnalysisManager, in addPass()
139 detail::PassConcept<Loop, LoopAnalysisManager,
161 runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM,
164 runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM,
168 static const Loop &getLoopFromIR(Loop &L) { return L; } in getLoopFromIR()
169 static const Loop &getLoopFromIR(LoopNest &LN) { in getLoopFromIR()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DLoopInfo.cpp44 template class LLVM_EXPORT_TEMPLATE llvm::LoopBase<BasicBlock, Loop>;
45 template class LLVM_EXPORT_TEMPLATE 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 DBlockFrequencyInfoImpl.cpp375 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 DLoopNestAnalysis.cpp35 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 DLoopAnalysisManager.cpp24 template class LLVM_EXPORT_TEMPLATE AllAnalysesOn<Loop>;
26 AnalysisManager<Loop, LoopStandardAnalysisResults &>;
30 FunctionAnalysisManager, Loop, LoopStandardAnalysisResults &>;
40 SmallVector<Loop *, 4> PreOrderLoops = LI->getLoopsInReverseSiblingPreorder(); in invalidate()
66 for (Loop *L : PreOrderLoops) { in invalidate()
88 PA.allAnalysesInSetPreserved<AllAnalysesOn<Loop>>(); in invalidate()
96 for (Loop *L : reverse(PreOrderLoops)) { in invalidate()
H A DLoopCacheAnalysis.cpp62 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()
386 if (Loop *L = LI.getLoopFor(BB)) { in delinearize()
456 bool IndexedReference::isLoopInvariant(const Loop &L) const { in isLoopInvariant()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopInterchange.cpp71 using LoopVector = SmallVector<Loop *, 8>;
130 Loop *L, DependenceInfo *DI, in populateDependencyMatrix()
287 static void populateWorklist(Loop &L, LoopVector &LoopList) { in populateWorklist()
292 Loop *CurrentLoop = &L; in populateWorklist()
293 const std::vector<Loop *> *Vec = &CurrentLoop->getSubLoops(); in populateWorklist()
310 static bool hasSupportedLoopDepth(ArrayRef<Loop *> LoopList, in hasSupportedLoopDepth()
317 Loop *OuterLoop = LoopList.front(); in hasSupportedLoopDepth()
332 ArrayRef<Loop *> LoopList) { in isComputableLoopNest()
333 for (Loop *L : LoopList) { in isComputableLoopNest()
356 LoopInterchangeLegality(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeLegality()
[all …]
H A DLoopPassManager.cpp25 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
26 LPMUpdater &>::run(Loop &L, LoopAnalysisManager &AM, in run()
40 PA.preserveSet<AllAnalysesOn<Loop>>(); in run()
45 void PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
67 LoopPassManager::runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithLoopNestPasses()
86 Loop *OuterMostLoop = &L; in runWithLoopNestPasses()
150 LoopPassManager::runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithoutLoopNestPasses()
252 SmallPriorityWorklist<Loop *, 4> Worklist; in run()
263 for (Loop *L : LI) in run()
271 assert(llvm::any_cast<const Loop *>(&IR)); in run()
[all …]
H A DSimpleLoopUnswitch.cpp193 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()
295 BasicBlock &UnswitchedSucc, BasicBlock &NormalSucc, Loop &L, in buildPartialInvariantUnswitchConditionalBranch()
415 static void hoistLoopToNewParent(Loop &L, BasicBlock &Preheader, in hoistLoopToNewParent()
419 Loop *OldParentL = L.getParentLoop(); in hoistLoopToNewParent()
425 Loop *NewParentL = nullptr; in hoistLoopToNewParent()
427 if (Loop *ExitL = LI.getLoopFor(ExitBB)) in hoistLoopToNewParent()
457 for (Loop *OldContainingL = OldParentL; OldContainingL != NewParentL; in hoistLoopToNewParent()
486 static Loop *getTopMostExitingLoop(const BasicBlock *ExitBB, in getTopMostExitingLoop()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnrollAndJam.cpp70 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()
215 llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, in UnrollAndJamLoop()
219 OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop) { in UnrollAndJamLoop()
225 Loop *SubLoop = *L->begin(); in UnrollAndJamLoop()
[all …]
H A DLoopUtils.cpp58 bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, in formDedicatedExitBlocks()
124 SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) { in findDefsUsedOutsideOfLoop()
204 static MDNode *createStringMetadata(Loop *TheLoop, StringRef Name, unsigned V) { in createStringMetadata()
215 void llvm::addStringMetadataToLoop(Loop *TheLoop, const char *StringMD, in addStringMetadataToLoop()
251 llvm::getOptionalElementCountLoopAttribute(const Loop *TheLoop) { in getOptionalElementCountLoopAttribute()
345 bool llvm::hasDisableAllTransformsHint(const Loop *L) { in hasDisableAllTransformsHint()
349 bool llvm::hasDisableLICMTransformsHint(const Loop *L) { in hasDisableLICMTransformsHint()
353 TransformationMode llvm::hasUnrollTransformation(const Loop *L) { in hasUnrollTransformation()
374 TransformationMode llvm::hasUnrollAndJamTransformation(const Loop *L) { in hasUnrollAndJamTransformation()
392 TransformationMode llvm::hasVectorizeTransformation(const Loop *L) { in hasVectorizeTransformation()
[all …]

12345678910>>...15