/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | LoopInfo.h | 1 //===- llvm/Analysis/LoopInfo.h - Natural Loop Calculator -------*- C++ -*-===// 33 class Loop; variable 40 extern template class LoopBase<BasicBlock, Loop>; 42 /// Represents a single loop in the control flow graph. Note that not all SCCs 44 class LLVM_EXTERNAL_VISIBILITY Loop : public LoopBase<BasicBlock, Loop> { 46 /// A range representing the start and end location of a loop. 65 /// Return true if the specified value is loop invariant. 68 /// Return true if all the operands of the specified instruction are loop 72 /// If the given value is an instruction inside of the loop and it can be 73 /// hoisted, do so to make it trivially loop-invariant. [all …]
|
H A D | LoopNestAnalysis.h | 10 /// This file defines the interface for the loop nest analysis. 23 using LoopVectorTy = SmallVector<Loop *, 8>; 27 /// This class represents a loop nest and can be used to query its properties. 32 /// Construct a loop nest rooted by loop \p Root. 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 [all...] |
H A D | LoopCacheAnalysis.h | 10 /// This file defines the interface for the loop cache analysis. 29 class Loop; variable 35 using LoopVectorTy = SmallVector<Loop *, 8>; 39 /// 3-dim loop nest: 81 /// the given loop \p L. Return false if the distance is not smaller than \p 84 unsigned MaxDistance, const Loop &L, 87 /// Compute the cost of the reference w.r.t. the given loop \p L when it is 88 /// considered in the innermost position in the loop nest. 90 /// - equal to one if the reference is loop invariant, or 93 /// + the coefficient of this loop' [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
H A D | LoopPassManager.h | 1 //===- LoopPassManager.h - Loop pass management -----------------*- C++ -*-===// 13 /// The primary loop pass pipeline is managed in a very particular way to 17 /// 3) A collection of Loop-specific analysis results are available: 22 /// 4) All loop passes preserve #1 (where possible), #2, and #3. 23 /// 5) Loop passes run over each loop in the loop nest from the innermost to 26 /// loop creates new inner loops, those are added and processed in this 31 /// optimizing loops, especially optimizing loop *nests* instead of single 60 std::declval<Loop &>(), std::declval<LoopAnalysisManager &>(), 70 class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 73 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | LoopUtils.h | 1 //===- llvm/Transforms/Utils/LoopUtils.h - Loop utilities -------*- C++ -*-===// 9 // This file defines some loop transformation utilities. 34 class Loop; variable 55 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, 58 /// Ensure that all exit blocks of the loop are dedicated exits. 60 /// For any loop exit block with non-loop predecessors, we split the loop 61 /// predecessors to use a dedicated loop exit block. We update the dominator 62 /// tree and loop info if provided, and will preserve LCSSA if requested. 63 bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, 67 /// innermost containing loop. [all …]
|
H A D | LoopVersioning.h | 1 //===- LoopVersioning.h - Utility to version a loop -------------*- C++ -*-===// 9 // This file defines a utility class to perform loop versioning. The versioned 10 // loop speculates that otherwise may-aliasing memory accesses don't overlap and 24 class Loop; variable 36 /// This class emits a version of the loop where run-time checks ensure 39 /// It currently only supports single-exit loops and assumes that the loop 43 /// Expects LoopAccessInfo, Loop, LoopInfo, DominatorTree as input. 48 ArrayRef<RuntimePointerCheck> Checks, Loop *L, LoopInfo *LI, 51 /// Performs the CFG manipulation part of versioning the loop including 54 /// The loop that was used to construct the class will be the "versioned" loop [all …]
|
H A D | UnrollLoop.h | 9 // This file defines some loop unrolling utilities. It does not define any 10 // actual pass or policy, but provides a single function to perform loop 31 class Loop; variable 40 using NewLoopsMap = SmallDenseMap<const Loop *, Loop *, 4>; 44 const char *const LLVMLoopUnrollFollowupAll = "llvm.loop.unroll.followup_all"; 46 "llvm.loop.unroll.followup_unrolled"; 48 "llvm.loop.unroll.followup_remainder"; 51 const Loop* addClonedBlockToLoopInfo(BasicBlock *OriginalBB, 57 /// The loop was not modified. 60 /// The loop was partially unrolled -- we still have a loop, but with a [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | GenericLoopInfo.h | 1 //===- GenericLoopInfo - Generic Loop Info for graphs -----------*- C++ -*-===// 10 // loops and determine the loop depth of various nodes in a generic graph of 11 // blocks. A natural loop has exactly one entry-point, which is called the 16 // each natural loop identified, this analysis identifies natural loops 17 // contained entirely within the loop and the basic blocks that make up the 18 // loop. 22 // * whether there is a preheader for the loop 24 // * whether or not a particular block branches out of the loop 25 // * the successor blocks of the loop 26 // * the loop dept [all...] |
H A D | GenericLoopInfoImpl.h | 1 //===- GenericLoopInfoImp.h - Generic Loop Info Implementation --*- C++ -*-===// 26 // APIs for simple analysis of the loop. See header notes. 28 /// getExitingBlocks - Return all blocks inside the loop that have successors 29 /// outside of the loop. These are the blocks _inside of the current loop_ 35 assert(!isInvalid() && "Loop not in a valid state!"); in getExitingBlocks() 39 // Not in current loop? It must be an exit block. in getExitingBlocks() 49 assert(!isInvalid() && "Loop not in a valid state!"); in getExitingBlock() 53 // Child not in current loop? It must be an exit block. in getExitingBlock() 60 /// getExitBlocks - Return all of the successor blocks of this loop. These 66 assert(!isInvalid() && "Loop not in a valid state!"); in getExitBlocks() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CGLoopInfo.h | 1 //===---- CGLoopInfo.h - LLVM CodeGen for loop metadata -*- C++ -*---------===// 9 // This is the internal state used for llvm translation for loop statement 40 /// Generate llvm.loop.parallel metadata for loads and stores. 43 /// State of loop vectorization or unrolling. 46 /// Value for llvm.loop.vectorize.enable metadata. 49 /// Value for llvm.loop.unroll.* metadata (enable, disable, or full). 52 /// Value for llvm.loop.unroll_and_jam.* metadata (enable, disable, or full). 55 /// Value for llvm.loop.vectorize.predicate metadata 58 /// Value for llvm.loop.vectorize.width metadata. 61 // Value for llvm.loop.vectorize.scalable.enable [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | LoopNestAnalysis.cpp | 1 //===- LoopNestAnalysis.cpp - Loop Nest Analysis --------------------------==// 10 /// The implementation for the loop nest analysis. 28 /// - the inner loop should be the outer loop's only child 29 /// - the outer loop header should 'flow' into the inner loop preheader 30 /// or jump around the inner loop to the outer loop latch 31 /// - if the inner loop latch exits the inner loop, it should 'flow' into 32 /// the outer loop latch. 33 /// Returns true if the loop structure satisfies the basic requirements and 35 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, 42 LoopNest::LoopNest(Loop &Root, ScalarEvolution &SE) in LoopNest() [all …]
|
H A D | LoopInfo.cpp | 1 //===- LoopInfo.cpp - Natural Loop Calculator -----------------------------===// 10 // and determine the loop depth of various nodes of the CFG. Note that the 12 // header node... not just a single natural loop. 44 template class llvm::LoopBase<BasicBlock, Loop>; 45 template class llvm::LoopInfoBase<BasicBlock, Loop>; 54 VerifyLoopInfoX("verify-loop-info", cl::location(VerifyLoopInfo), 55 cl::Hidden, cl::desc("Verify loop info (time consuming)")); 58 // Loop implementation 61 bool Loop::isLoopInvariant(const Value *V) const { in isLoopInvariant() 64 return true; // All non-instructions are loop invariant in isLoopInvariant() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LoopVersioningLICM.cpp | 1 //===- LoopVersioningLICM.cpp - LICM Loop Versioning ----------------------===// 12 // use loop versioning as an alternative. 14 // Loop Versioning will create a version of the loop with aggressive aliasing 16 // assumptions. The version of the loop making aggressive aliasing assumptions 18 // loop will be preceded by a memory runtime check. This runtime check consists 19 // of bound checks for all unique memory accessed in loop, and it ensures the 21 // the loop versions is executed: If the runtime check detects any memory 22 // aliasing, then the original loop is executed. Otherwise, the version with 28 // b) If loop is a candidate for versioning then create a memory bound check, 29 // by considering all the memory accesses in loop body. [all …]
|
H A D | LoopPassManager.cpp | 1 //===- LoopPassManager.cpp - Loop pass management -------------------------===// 23 /// Explicitly specialize the pass manager's run method to handle loop nest 26 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, 27 LPMUpdater &>::run(Loop &L, LoopAnalysisManager &AM, in run() 29 // Runs loop-nest passes only when the current loop is a top-level one. in run() 34 // Invalidation for the current loop should be handled above, and other loop in run() 35 // analysis results shouldn't be impacted by runs over this loop. Therefore, in run() 39 // FIXME: This isn't correct! This loop an in run() [all...] |
H A D | LoopInterchange.cpp | 1 //===- LoopInterchange.cpp - Loop interchange pass-------------------------===// 9 // This Pass handles loop interchange transform. 52 #define DEBUG_TYPE "loop-interchange" 57 "loop-interchange-threshold", cl::init(0), cl::Hidden, 62 using LoopVector = SmallVector<Loop *, 8>; 72 // Maximum loop depth supported. 86 Loop *L, DependenceInfo *DI, in populateDependencyMatrix() 163 << " dependencies inside loop\n"); in populateDependencyMatrix() 173 // A loop is moved from index 'from' to an index 'to'. Update the Dependence 215 static void populateWorklist(Loop &L, LoopVector &LoopList) { in populateWorklist() [all …]
|
H A D | LoopSimplifyCFG.cpp | 1 //===--------- LoopSimplifyCFG.cpp - Loop CFG Simplification Pass ---------===// 9 // This file implements the Loop SimplifyCFG Pass. This pass is responsible for 10 // basic loop CFG cleanup, primarily to assist other loop passes. If you 11 // encounter a noncanonical CFG construct that causes another loop pass to 35 #define DEBUG_TYPE "loop-simplifycfg" 37 static cl::opt<bool> EnableTermFolding("enable-loop-simplifycfg-term-folding", 43 "Number of loop blocks deleted"); 45 "Number of loop exiting edges deleted"); 77 static void removeBlockFromLoops(BasicBlock *BB, Loop *FirstLoop, in removeBlockFromLoops() 78 Loop *LastLoop = nullptr) { in removeBlockFromLoops() [all …]
|
H A D | SimpleLoopUnswitch.cpp | 1 ///===- SimpleLoopUnswitch.cpp - Hoist loop-invariant control flow ---------===// 69 #define DEBUG_TYPE "simple-loop-unswitch" 87 cl::desc("Forcibly enables non-trivial loop unswitching rather than " 92 cl::desc("The cost threshold for unswitching a loop.")); 106 "simple-loop-unswitch-guards", cl::init(true), cl::Hidden, 107 cl::desc("If enabled, simple loop unswitching will also consider " 110 "simple-loop-unswitch-drop-non-trivial-implicit-null-checks", 115 MSSAThreshold("simple-loop-unswitch-memoryssa-threshold", 120 "freeze-loop-unswitch-cond", cl::init(true), cl::Hidden, 122 "of loop unswitc [all...] |
H A D | LoopUnrollAndJamPass.cpp | 1 //===- LoopUnrollAndJam.cpp - Loop unroll and jam pass --------------------===// 54 #define DEBUG_TYPE "loop-unroll-and-jam" 59 "llvm.loop.unroll_and_jam.followup_all"; 61 "llvm.loop.unroll_and_jam.followup_inner"; 63 "llvm.loop.unroll_and_jam.followup_outer"; 65 "llvm.loop.unroll_and_jam.followup_remainder_inner"; 67 "llvm.loop.unroll_and_jam.followup_remainder_outer"; 81 cl::desc("Threshold to use for inner loop when doing unroll and jam.")); 88 // Returns the loop hint metadata node with the given name (for example, 89 // "llvm.loop.unroll.count"). If no such metadata node exists, then nullptr is [all …]
|
/freebsd/contrib/bmake/unit-tests/ |
H A D | directive-for-escape.exp | 2 For: loop body with chars = !"#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~: 6 in .for loop from directive-for-escape.mk:20 with chars = !"#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~ 9 For: loop body with chars = !"\\#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~: 13 …in .for loop from directive-for-escape.mk:32 with chars = !"\\#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|… 16 For: loop body with i = $: 19 For: loop body with i = ${V}: 22 For: loop body with i = ${V:=-with-modifier}: 25 For: loop body with i = $(V): 28 For: loop body with i = $(V:=-with-modifier): 32 For: loop body with i = $: [all …]
|
H A D | directive-for.mk | 5 # TODO: Describe naming conventions for the loop variables. 13 # varmod-loop.mk The ':@var@...@' modifier 15 # A typical use case for a .for loop is to populate a variable with a list of 27 # The .for loop also works for multiple iteration variables. 37 # The .for loop splits the items at whitespace, taking quotes into account, 40 # Until 2012-06-03, the .for loop had split the items exactly at whitespace, 51 # In the body of the .for loop, the iteration variables can be accessed 54 # Instead, before interpreting the body of the .for loop, the body is 60 # namespaces and do not influence each other. The "scope" of the .for loop 68 . warning After the .for loop, var must still have its original value. [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | LoopUnrollRuntime.cpp | 1 //===-- UnrollLoopRuntime.cpp - Runtime Loop unrolling utilities ----------===// 9 // This file implements some loop unrolling utilities for loops with run-time 18 // unrolled loop to execute the 'left over' iterations before or after the 19 // unrolled loop. 47 #define DEBUG_TYPE "loop-unroll" 59 // Probability that the loop trip count is so small that after the prolog 60 // we do not enter the unrolled loop at all. 61 // It is unlikely that the loop trip count is smaller than the unroll factor; 64 // Probability that the loop trip count is so small that we skip the unrolled 65 // loop completely and immediately enter the epilogue loop. [all …]
|
H A D | LoopSimplify.cpp | 1 //===- LoopSimplify.cpp - Loop Canonicalization Pass ----------------------===// 13 // Loop pre-header insertion guarantees that there is a single, non-critical 14 // entry edge from outside of the loop to the loop header. This simplifies a 17 // Loop exit-block insertion guarantees that all exit blocks from the loop 18 // (blocks which are outside of the loop that have predecessors inside of the 19 // loop) only have predecessors from inside of the loop (and are thus dominated 20 // by the loop header). This simplifies transformations such as store-sinking 25 // Indirectbr instructions introduce several complications. If the loop 27 // to transform the loop and make these guarantees. Client code should check 37 // This pass obviously modifies the CFG, but updates loop information and [all …]
|
H A D | LoopUtils.cpp | 1 //===-- LoopUtils.cpp - Loop Utility functions -------------------------===// 9 // This file defines common loop utility functions. 52 #define DEBUG_TYPE "loop-utils" 54 static const char *LLVMLoopDisableNonforced = "llvm.loop.disable_nonforced"; 57 bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI, in formDedicatedExitBlocks() 62 // We re-use a vector for the in-loop predecesosrs. in formDedicatedExitBlocks() 70 // See if there are any non-loop predecessors of this exit block and in formDedicatedExitBlocks() 71 // keep track of the in-loop predecessors. in formDedicatedExitBlocks() 84 assert(!InLoopPredecessors.empty() && "Must have *some* loop predecessor!"); in formDedicatedExitBlocks() 95 dbgs() << "WARNING: Can't create a dedicated exit block for loop: " in formDedicatedExitBlocks() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/ |
H A D | LoopVectorizationLegality.h | 11 /// in Loop Vectorizer has been moved out to its own file for modularity 14 /// Currently, it works for innermost loop vectorization. Extending this to 15 /// outer loop vectorization is a TODO item. 18 /// 1) LoopVectorizeHints class which keeps a number of loop annotations 20 /// loop metadata, upon request. 41 class Loop; variable 51 /// Utility class for getting and setting loop vectorizer hints in the form 52 /// of loop metadata. 53 /// This class keeps a number of loop annotations locally (as member variables) 54 /// and can, upon request, write them back as metadata on the loop. It will [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 …]
|