| /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/Utils/ |
| H A D | LoopUtils.h | 32 class Loop; variable 57 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, 65 bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, 100 bool formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 112 bool formLCSSARecursively(Loop &L, const DominatorTree &DT, const LoopInfo *LI, 123 Loop *L = nullptr, MemorySSA *MSSA = nullptr); 125 SinkAndHoistLICMFlags(bool IsSink, Loop *L = nullptr, 152 TargetTransformInfo *, Loop *, AliasSetTracker *, 165 BlockFrequencyInfo *, TargetLibraryInfo *, Loop *, 181 void deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE, [all …]
|
| H A D | UnrollLoop.h | 29 class Loop; variable 38 using NewLoopsMap = SmallDenseMap<const Loop *, Loop *, 4>; 49 const Loop* addClonedBlockToLoopInfo(BasicBlock *OriginalBB, 82 LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, 87 Loop **RemainderLoop = nullptr); 90 Loop *L, unsigned Count, bool AllowExpensiveTripCount, 94 Loop **ResultLoop = nullptr); 96 LoopUnrollResult UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, 102 Loop **EpilogueLoop = nullptr); 104 bool isSafeToUnrollAndJam(Loop *L, ScalarEvolution &SE, DominatorTree &DT, [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/ |
| H A D | MachineLoopUtils.cpp | 28 MachineBasicBlock *Loop, in PeelSingleBlockLoop() argument 31 MachineFunction &MF = *Loop->getParent(); in PeelSingleBlockLoop() 32 MachineBasicBlock *Preheader = *Loop->pred_begin(); in PeelSingleBlockLoop() 33 if (Preheader == Loop) in PeelSingleBlockLoop() 34 Preheader = *std::next(Loop->pred_begin()); in PeelSingleBlockLoop() 35 MachineBasicBlock *Exit = *Loop->succ_begin(); in PeelSingleBlockLoop() 36 if (Exit == Loop) in PeelSingleBlockLoop() 37 Exit = *std::next(Loop->succ_begin()); in PeelSingleBlockLoop() 39 MachineBasicBlock *NewBB = MF.CreateMachineBasicBlock(Loop->getBasicBlock()); in PeelSingleBlockLoop() 41 MF.insert(Loop->getIterator(), NewBB); in PeelSingleBlockLoop() [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
| H A D | LoopInfo.cpp | 47 template class llvm::LoopBase<BasicBlock, Loop>; 48 template class llvm::LoopInfoBase<BasicBlock, Loop>; 64 bool Loop::isLoopInvariant(const Value *V) const { in isLoopInvariant() 70 bool Loop::hasLoopInvariantOperands(const Instruction *I) const { in hasLoopInvariantOperands() 74 bool Loop::makeLoopInvariant(Value *V, bool &Changed, Instruction *InsertPt, in makeLoopInvariant() 81 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 static ICmpInst *getLatchCmpInst(const Loop &L) { in getLatchCmpInst() 184 static Value *findFinalIVValue(const Loop &L, const PHINode &IndVar, in findFinalIVValue() [all …]
|
| H A D | BlockFrequencyInfoImpl.cpp | 361 const LoopData *OuterLoop, LoopData &Loop, Distribution &Dist) { in addLoopSuccessorsToDist() argument 363 for (const auto &I : Loop.Exits) in addLoopSuccessorsToDist() 364 if (!addToDist(Dist, OuterLoop, Loop.getHeader(), I.first, in addLoopSuccessorsToDist() 373 void BlockFrequencyInfoImplBase::computeLoopScale(LoopData &Loop) { in computeLoopScale() argument 375 LLVM_DEBUG(dbgs() << "compute-loop-scale: " << getLoopName(Loop) << "\n"); in computeLoopScale() 391 for (auto &Mass : Loop.BackedgeMass) in computeLoopScale() 398 Loop.Scale = in computeLoopScale() 404 << " - scale = " << Loop.Scale << "\n"); in computeLoopScale() 408 void BlockFrequencyInfoImplBase::packageLoop(LoopData &Loop) { in packageLoop() argument 409 LLVM_DEBUG(dbgs() << "packaging-loop: " << getLoopName(Loop) << "\n"); in packageLoop() [all …]
|
| H A D | SyncDependenceAnalysis.cpp | 138 static void computeLoopPO(const LoopInfo &LI, Loop &Loop, POCB CallBack, 142 static void computeStackPO(BlockStack &Stack, const LoopInfo &LI, Loop *Loop, in computeStackPO() argument 144 const auto *LoopHeader = Loop ? Loop->getHeader() : nullptr; in computeStackPO() 149 bool IsNestedLoop = NestedLoop != Loop; in computeStackPO() 159 if (Loop && !Loop->contains(NestedExitBB)) in computeStackPO() 179 if (Loop && !Loop->contains(SuccBB)) in computeStackPO() 204 static void computeLoopPO(const LoopInfo &LI, Loop &Loop, POCB CallBack, in computeLoopPO() argument 208 const auto *LoopHeader = Loop.getHeader(); in computeLoopPO() 216 if (!Loop.contains(BB)) in computeLoopPO() 224 computeStackPO(Stack, LI, &Loop, CallBack, Finalized); in computeLoopPO()
|
| H A D | LoopNestAnalysis.cpp | 36 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, 43 LoopNest::LoopNest(Loop &Root, ScalarEvolution &SE) in LoopNest() 48 std::unique_ptr<LoopNest> LoopNest::getLoopNest(Loop &Root, in getLoopNest() 53 bool LoopNest::arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop, in arePerfectlyNested() 165 for (Loop *L : depth_first(const_cast<Loop *>(Loops.front()))) { in getPerfectLoops() 181 unsigned LoopNest::getMaxPerfectDepth(const Loop &Root, ScalarEvolution &SE) { in getMaxPerfectDepth() 185 const Loop *CurrentLoop = &Root; in getMaxPerfectDepth() 190 const Loop *InnerLoop = SubLoops->front(); in getMaxPerfectDepth() 235 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, in checkLoopsStructure() 366 for (const Loop *L : LN.getLoops()) in operator <<() [all …]
|
| H A D | DivergenceAnalysis.cpp | 94 const Function &F, const Loop *RegionLoop, const DominatorTree &DT, in DivergenceAnalysisImpl() 118 for (const auto *Loop = LI.getLoopFor(Inst->getParent()); in isTemporalDivergent() local 119 Loop != RegionLoop && !Loop->contains(&ObservingBlock); in isTemporalDivergent() 120 Loop = Loop->getParentLoop()) { in isTemporalDivergent() 121 if (DivergentLoops.contains(Loop)) in isTemporalDivergent() 160 const Loop &DivLoop) { in getIfCarriedInstruction() 170 const Instruction &I, const Loop &OuterDivLoop) { in analyzeTemporalDivergence() 192 const BasicBlock &DivExit, const Loop &OuterDivLoop) { in analyzeLoopExitDivergence() 246 const BasicBlock &DivExit, const Loop &InnerDivLoop) { in propagateLoopExitDivergence() 250 const Loop *DivLoop = &InnerDivLoop; in propagateLoopExitDivergence() [all …]
|
| H A D | LoopCacheAnalysis.cpp | 61 static Loop *getInnerMostLoop(const LoopVectorTy &Loops) { in getInnerMostLoop() 64 Loop *LastLoop = Loops.back(); in getInnerMostLoop() 65 Loop *ParentLoop = LastLoop->getParentLoop(); in getInnerMostLoop() 73 [](const Loop *L1, const Loop *L2) { in getInnerMostLoop() 81 const Loop &L, ScalarEvolution &SE) { in isOneDimensionalArray() 107 static const SCEV *computeTripCount(const Loop &L, ScalarEvolution &SE) { in computeTripCount() 207 const Loop &L, in hasTemporalReuse() 264 CacheCostTy IndexedReference::computeRefCost(const Loop &L, in computeRefCost() 332 if (Loop *L = LI.getLoopFor(BB)) { in delinearize() 390 bool IndexedReference::isLoopInvariant(const Loop &L) const { in isLoopInvariant() [all …]
|
| H A D | LoopAnalysisManager.cpp | 25 template class AllAnalysesOn<Loop>; 26 template class AnalysisManager<Loop, LoopStandardAnalysisResults &>; 28 template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop, 39 SmallVector<Loop *, 4> PreOrderLoops = LI->getLoopsInReverseSiblingPreorder(); in invalidate() 65 for (Loop *L : PreOrderLoops) { in invalidate() 87 PA.allAnalysesInSetPreserved<AllAnalysesOn<Loop>>(); in invalidate() 95 for (Loop *L : reverse(PreOrderLoops)) { in invalidate()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/ |
| H A D | LoopNestAnalysis.h | 23 using LoopVectorTy = SmallVector<Loop *, 8>; 30 LoopNest(Loop &Root, ScalarEvolution &SE); 36 static std::unique_ptr<LoopNest> getLoopNest(Loop &Root, ScalarEvolution &SE); 49 static bool arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop, 61 static unsigned getMaxPerfectDepth(const Loop &Root, ScalarEvolution &SE); 72 Loop &getOutermostLoop() const { return *Loops.front(); } in getOutermostLoop() 77 Loop *getInnermostLoop() const { in getInnermostLoop() 84 Loop *LastLoop = Loops.back(); in getInnermostLoop() 92 Loop *getLoop(unsigned Index) const { in getLoop() 101 ArrayRef<Loop *> getLoops() const { return Loops; } in getLoops() [all …]
|
| H A D | ScalarEvolution.h | 63 class Loop; variable 554 const SCEV *getAddRecExpr(const SCEV *Start, const SCEV *Step, const Loop *L, 557 const Loop *L, SCEV::NoWrapFlags Flags); 559 const Loop *L, SCEV::NoWrapFlags Flags) { 686 const SCEV *getSCEVAtScope(const SCEV *S, const Loop *L); 689 const SCEV *getSCEVAtScope(Value *V, const Loop *L); 694 bool isLoopEntryGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 705 bool isLoopBackedgeGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, 713 unsigned getSmallConstantTripCount(const Loop *L); 722 unsigned getSmallConstantTripCount(const Loop *L, [all …]
|
| H A D | DependenceAnalysis.h | 50 class Loop; variable 391 const Loop *AssociatedLoop; 436 const Loop *getAssociatedLoop() const; 439 void setPoint(const SCEV *X, const SCEV *Y, const Loop *CurrentLoop); 443 const SCEV *C, const Loop *CurrentLoop); 446 void setDistance(const SCEV *D, const Loop *CurrentLoop); 516 unsigned mapSrcLoop(const Loop *SrcLoop) const; 520 unsigned mapDstLoop(const Loop *DstLoop) const; 524 bool isLoopInvariant(const SCEV *Expression, const Loop *LoopNest) const; 541 const Loop *LoopNest, [all …]
|
| H A D | LoopCacheAnalysis.h | 32 using LoopVectorTy = SmallVector<Loop *, 8>; 81 unsigned MaxDistance, const Loop &L, 93 CacheCostTy computeRefCost(const Loop &L, unsigned CLS) const; 100 bool isLoopInvariant(const Loop &L) const; 106 bool isConsecutive(const Loop &L, unsigned CLS) const; 114 const Loop &L) const; 118 bool isSimpleAddRecurrence(const SCEV &Subscript, const Loop &L) const; 176 using LoopTripCountTy = std::pair<const Loop *, unsigned>; 177 using LoopCacheCostTy = std::pair<const Loop *, CacheCostTy>; 195 getCacheCost(Loop &Root, LoopStandardAnalysisResults &AR, DependenceInfo &DI, [all …]
|
| H A D | BlockFrequencyInfoImpl.h | 56 class Loop; variable 274 LoopData *Loop = nullptr; ///< The loop this block is inside. member 279 bool isLoopHeader() const { return Loop && Loop->isHeader(Node); } in isLoopHeader() 282 return isLoopHeader() && Loop->Parent && Loop->Parent->isIrreducible() && in isDoubleLoopHeader() 283 Loop->Parent->isHeader(Node); in isDoubleLoopHeader() 288 return Loop; in getContainingLoop() 290 return Loop->Parent; in getContainingLoop() 291 return Loop->Parent->Parent; in getContainingLoop() 313 if (!Loop || !Loop->IsPackaged) in getPackagedLoop() 315 auto L = Loop; in getPackagedLoop() [all …]
|
| H A D | LoopInfo.h | 59 class Loop; variable 520 raw_ostream &operator<<(raw_ostream &OS, const LoopBase<BlockT, LoopT> &Loop) { 521 Loop.print(OS); 526 extern template class LoopBase<BasicBlock, Loop>; 530 class Loop : public LoopBase<BasicBlock, Loop> { 643 static Optional<Loop::LoopBounds> getBounds(const Loop &L, PHINode &IndVar, 704 LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F, in LoopBounds() 706 : L(Loop), InitialIVValue(I), StepInst(SI), StepValue(SV), in LoopBounds() 709 const Loop &L; 871 Loop() = default; [all …]
|
| H A D | LoopPass.h | 38 virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0; 44 virtual bool doInitialization(Loop *L, LPPassManager &LPM) { in doInitialization() 72 bool skipLoop(const Loop *L) const; 108 void addLoop(Loop &L); 111 void markLoopAsDeleted(Loop &L); 114 std::deque<Loop *> LQ; 116 Loop *CurrentLoop;
|
| H A D | DivergenceAnalysis.h | 28 class Loop; variable 46 DivergenceAnalysisImpl(const Function &F, const Loop *RegionLoop, 51 const Loop *getRegionLoop() const { return RegionLoop; } in getRegionLoop() 97 const Loop &DivLoop); 101 const Loop &OuterDivLoop); 106 const Loop &OuterDivLoop); 126 const Loop *RegionLoop; 132 DenseSet<const Loop *> DivergentLoops;
|
| /netbsd-src/external/apache2/llvm/dist/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, 107 detail::PassModel<Loop, PassT, PreservedAnalyses, LoopAnalysisManager, in addPass() 131 detail::PassModel<Loop, RepeatedPass<PassT>, PreservedAnalyses, in addPass() 159 detail::PassConcept<Loop, LoopAnalysisManager, 180 PreservedAnalyses runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 183 PreservedAnalyses runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, 193 typedef PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-exegesis/lib/ |
| H A D | SnippetRepetitor.cpp | 61 auto Loop = Filler.addBasicBlock(); in Repeat() local 72 Entry.MBB->addSuccessor(Loop.MBB, BranchProbability::getOne()); in Repeat() 73 Loop.MBB->addSuccessor(Loop.MBB, BranchProbability::getOne()); in Repeat() 76 Loop.MBB->addLiveIn(LoopCounter); in Repeat() 78 Loop.MBB->addLiveIn(Reg); in Repeat() 80 Loop.MBB->addLiveIn(LiveIn); in Repeat() 81 Loop.addInstructions(Instructions); in Repeat() 82 ET.decrementLoopCounterAndJump(*Loop.MBB, *Loop.MBB, in Repeat() 86 Loop.MBB->addSuccessor(Exit.MBB, BranchProbability::getZero()); in Repeat() 111 case InstructionBenchmark::Loop: in Create()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/ |
| H A D | LoopPassManager.cpp | 27 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 28 LPMUpdater &>::run(Loop &L, LoopAnalysisManager &AM, in run() 42 PA.preserveSet<AllAnalysesOn<Loop>>(); in run() 49 LoopPassManager::runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithLoopNestPasses() 129 LoopPassManager::runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, in runWithoutLoopNestPasses() 225 SmallPriorityWorklist<Loop *, 4> Worklist; in run() 236 for (Loop *L : LI) in run() 244 assert(any_isa<const Loop *>(IR) || any_isa<const LoopNest *>(IR)); in run() 245 const Loop *L = any_isa<const Loop *>(IR) in run() 246 ? any_cast<const Loop *>(IR) in run() [all …]
|
| H A D | SimpleLoopUnswitch.cpp | 115 collectHomogenousInstGraphLoopInvariants(Loop &L, Instruction &Root, in collectHomogenousInstGraphLoopInvariants() 157 static void replaceLoopInvariantUses(Loop &L, Value *Invariant, in replaceLoopInvariantUses() 174 static bool areLoopExitPHIsLoopInvariant(Loop &L, BasicBlock &ExitingBB, in areLoopExitPHIsLoopInvariant() 279 static void hoistLoopToNewParent(Loop &L, BasicBlock &Preheader, in hoistLoopToNewParent() 283 Loop *OldParentL = L.getParentLoop(); in hoistLoopToNewParent() 289 Loop *NewParentL = nullptr; in hoistLoopToNewParent() 291 if (Loop *ExitL = LI.getLoopFor(ExitBB)) in hoistLoopToNewParent() 321 for (Loop *OldContainingL = OldParentL; OldContainingL != NewParentL; in hoistLoopToNewParent() 350 static Loop *getTopMostExitingLoop(BasicBlock *ExitBB, LoopInfo &LI) { in getTopMostExitingLoop() 351 Loop *TopMost = LI.getLoopFor(ExitBB); in getTopMostExitingLoop() [all …]
|
| H A D | LoopInterchange.cpp | 66 using LoopVector = SmallVector<Loop *, 8>; 90 Loop *L, DependenceInfo *DI) { in populateDependencyMatrix() 273 static LoopVector populateWorklist(Loop &L) { in populateWorklist() 278 Loop *CurrentLoop = &L; in populateWorklist() 279 const std::vector<Loop *> *Vec = &CurrentLoop->getSubLoops(); in populateWorklist() 295 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) { in getInductionVariable() 327 LoopInterchangeLegality(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeLegality() 346 bool tightlyNested(Loop *Outer, Loop *Inner); 353 bool findInductionAndReductions(Loop *L, 355 Loop *InnerLoop); [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/ |
| H A D | LoopUtils.cpp | 63 bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, in formDedicatedExitBlocks() 132 SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) { in findDefsUsedOutsideOfLoop() 212 static MDNode *createStringMetadata(Loop *TheLoop, StringRef Name, unsigned V) { in createStringMetadata() 223 void llvm::addStringMetadataToLoop(Loop *TheLoop, const char *StringMD, in addStringMetadataToLoop() 263 Optional<const MDOperand *> llvm::findStringMetadataForLoop(const Loop *TheLoop, in findStringMetadataForLoop() 278 static Optional<bool> getOptionalBoolLoopAttribute(const Loop *TheLoop, in getOptionalBoolLoopAttribute() 296 bool llvm::getBooleanLoopAttribute(const Loop *TheLoop, StringRef Name) { in getBooleanLoopAttribute() 301 llvm::getOptionalElementCountLoopAttribute(const Loop *TheLoop) { in getOptionalElementCountLoopAttribute() 314 llvm::Optional<int> llvm::getOptionalIntLoopAttribute(const Loop *TheLoop, in getOptionalIntLoopAttribute() 409 bool llvm::hasDisableAllTransformsHint(const Loop *L) { in hasDisableAllTransformsHint() [all …]
|
| H A D | LoopUnrollAndJam.cpp | 74 static bool partitionLoopBlocks(Loop &L, BasicBlockSet &ForeBlocks, in partitionLoopBlocks() 76 Loop *SubLoop = L.getSubLoops()[0]; in partitionLoopBlocks() 106 Loop &Root, Loop &JamLoop, BasicBlockSet &JamLoopBlocks, in partitionOuterLoopBlocks() 107 DenseMap<Loop *, BasicBlockSet> &ForeBlocksMap, in partitionOuterLoopBlocks() argument 108 DenseMap<Loop *, BasicBlockSet> &AftBlocksMap, DominatorTree &DT) { in partitionOuterLoopBlocks() 111 for (Loop *L : Root.getLoopsInPreorder()) { in partitionOuterLoopBlocks() 124 static bool partitionOuterLoopBlocks(Loop *L, Loop *SubLoop, in partitionOuterLoopBlocks() 226 Loop *L, unsigned Count, unsigned TripCount, unsigned TripMultiple, in UnrollAndJamLoop() 229 OptimizationRemarkEmitter *ORE, LPMUpdater *U, Loop **EpilogueLoop) { in UnrollAndJamLoop() 235 Loop *SubLoop = *L->begin(); in UnrollAndJamLoop() [all …]
|