Home
last modified time | relevance | path

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

12345678910>>...14

/freebsd-src/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DLoopUtils.h1 //===- llvm/Transforms/Utils/LoopUtils.h - Loop utilities -------*- C++ -*-===//
34 class Loop;
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); in setIsSink()
148 /// TargetLibraryInfo, Loop, AliasSet information for all
154 TargetLibraryInfo *, TargetTransformInfo *, Loop *CurLoo
32 class Loop; global() variable
[all...]
H A DUnrollLoop.h31 class Loop;
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 **EpilogueLoo
29 class Loop; global() variable
[all...]
H A DLoopConstrainer.h22 class Loop; variable
84 parseLoopStructure(ScalarEvolution &, Loop &, bool, const char *&);
141 Loop *createClonedLoopStructure(Loop *Original, Loop *Parent,
195 function_ref<void(Loop *, bool)> LPMAddNewLoop;
198 Loop &OriginalLoop;
216 LoopConstrainer(Loop &L, LoopInfo &LI,
217 function_ref<void(Loop *, bool)> LPMAddNewLoop,
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()
114 Loop *VersionedLoop;
117 Loop *NonVersionedLoop = nullptr;
/freebsd-src/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DLoopInfo.h1 //===- llvm/Analysis/LoopInfo.h - Natural Loop Calculator -------*- C++ -*-===//
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), InitialIVValu in LoopBounds()
400 explicit Loop(BasicBlock *BB) : LoopBase<BasicBlock, Loop>(BB) {} Loop() function
[all...]
H A DLoopNestAnalysis.h23 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 DLoopCacheAnalysis.h29 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 DScalarEvolution.h58 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 *
[all...]
H A DDependenceAnalysis.h50 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 DLoopPass.h23 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 DBlockFrequencyInfoImpl.h63 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 in getContainingLoop()
[all...]
H A DLoopAnalysisManager.h1 //===- LoopAnalysisManager.h - Loop analysis management ---------*- C++ -*-===//
14 /// Loop analyses are allowed to make some simplifying assumptions:
42 class Loop;
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,
155 /// A proxy from a \c FunctionAnalysisManager to a \c Loop.
156 typedef OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop,
40 class Loop; global() variable
H A DIVDescriptors.h27 class Loop; variable
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 *L, ScalarEvolution *SE,
343 static bool isFPInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
352 static bool isInductionPHI(PHINode *Phi, const Loop *L,
/freebsd-src/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-src/contrib/llvm-project/llvm/lib/Analysis/
H A DLoopInfo.cpp1 //===- LoopInfo.cpp - Natural Loop Calculator -----------------------------===//
44 template class llvm::LoopBase<BasicBlock, Loop>;
45 template class llvm::LoopInfoBase<BasicBlock, Loop>;
58 // Loop implementation
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()
132 assert(PI != pred_end(H) && "Loop mus in getIncomingAndBackEdge()
[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 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) << "\ in packageLoop()
427 if (auto *Loop = Working[M.Index].getPackagedLoop()) packageLoop() local
515 unwrapLoop(BlockFrequencyInfoImplBase & BFI,LoopData & Loop) unwrapLoop() argument
784 auto Loop = BFI.Loops.emplace(Insert, OuterLoop, Headers.begin(), createIrreducibleLoop() local
827 adjustLoopHeaderMass(LoopData & Loop) adjustLoopHeaderMass() argument
[all...]
H A DLoopAnalysisManager.cpp1 //===- LoopAnalysisManager.cpp - Loop analysis management -----------------===//
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()
64 // NB! `L` may not be in a good enough state to run Loop::getName. in invalidate()
85 PA.allAnalysesInSetPreserved<AllAnalysesOn<Loop>>(); in invalidate()
88 // the analysis manager associated with the Loop keys, but we need to in invalidate()
93 for (Loop * in invalidate()
[all...]
H A DLoopCacheAnalysis.cpp1 //===- LoopCacheAnalysis.cpp - Loop Cache Analysis -------------------------==//
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
[all...]
/freebsd-src/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DLoopPassManager.h1 //===- LoopPassManager.h - Loop pass management -----------------*- C++ -*-===//
17 /// 3) A collection of Loop-specific analysis results are available:
23 /// 5) Loop passes run over each loop in the loop nest from the innermost to
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, in addPass()
163 PreservedAnalyses runWithLoopNestPasses(Loop in addPass()
[all...]
/freebsd-src/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopInterchange.cpp1 //===- LoopInterchange.cpp - Loop interchange pass-------------------------===//
62 using LoopVector = SmallVector<Loop *, 8>;
86 Loop *L, DependenceInfo *DI, in populateDependencyMatrix()
215 static void populateWorklist(Loop &L, LoopVector &LoopList) { in populateWorklist()
217 << L.getHeader()->getParent()->getName() << " Loop: %" 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 *
1097 isProfitablePerLoopCacheAnalysis(const DenseMap<const Loop *,unsigned> & CostMap,std::unique_ptr<CacheCost> & CC) isProfitablePerLoopCacheAnalysis() argument
1156 isProfitable(const Loop * InnerLoop,const Loop * OuterLoop,unsigned InnerLoopId,unsigned OuterLoopId,CharMatrix & DepMatrix,const DenseMap<const Loop *,unsigned> & CostMap,std::unique_ptr<CacheCost> & CC) isProfitable() argument
[all...]
H A DLoopPassManager.cpp26 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(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()
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 in getTopMostExitingLoop()
[all...]
/freebsd-src/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnrollAndJam.cpp1 //===-- LoopUnrollAndJam.cpp - Loop unrolling utilities -------------------===//
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 *SubLoo
754 checkDependencies(Loop & Root,const BasicBlockSet & SubLoopBlocks,const DenseMap<Loop *,BasicBlockSet> & ForeBlocksMap,const DenseMap<Loop *,BasicBlockSet> & AftBlocksMap,DependenceInfo & DI,LoopInfo & LI) checkDependencies() argument
[all...]
H A DLoopUtils.cpp1 //===-- LoopUtils.cpp - Loop Utility functions -------------------------===//
57 bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, in formDedicatedExitBlocks()
123 SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) { in findDefsUsedOutsideOfLoop()
163 // Loop passes are designed to run inside of a loop pass manager which means in getLoopAnalysisUsage()
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 *
1585 appendReversedLoopsToWorklist(RangeT && Loops,SmallPriorityWorklist<Loop *,4> & Worklist) appendReversedLoopsToWorklist() argument
1610 appendLoopsToWorklist(RangeT && Loops,SmallPriorityWorklist<Loop *,4> & Worklist) appendLoopsToWorklist() argument
1622 appendLoopsToWorklist(LoopInfo & LI,SmallPriorityWorklist<Loop *,4> & Worklist) appendLoopsToWorklist() argument
[all...]

12345678910>>...14