Home
last modified time | relevance | path

Searched full:loop (Results 1 – 25 of 3411) sorted by relevance

12345678910>>...137

/openbsd-src/gnu/gcc/gcc/
H A Dcfgloop.c1 /* Natural loop discovery code for GNU compiler.
37 considered to belong to inner loop with same header. */
44 static int flow_loop_level_compute (struct loop *);
46 static void establish_preds (struct loop *);
50 /* Dump loop related CFG information. */
93 /* Return nonzero if the nodes of LOOP are a subset of OUTER. */
96 flow_loop_nested_p (const struct loop *outer, const struct loop *loop) in flow_loop_nested_p() argument
98 return (loop->depth > outer->depth in flow_loop_nested_p()
99 && loop->pred[outer->depth] == outer); in flow_loop_nested_p()
102 /* Returns the loop such that LOOP is nested DEPTH (indexed from zero)
[all …]
H A Dcfgloopmanip.c1 /* Loop manipulation code for GNU compiler.
34 static void duplicate_subloops (struct loops *, struct loop *, struct loop *);
35 static void copy_loops_to (struct loops *, struct loop **, int,
36 struct loop *);
43 static void add_loop (struct loops *, struct loop *);
44 static void fix_loop_placements (struct loops *, struct loop *, bool *);
47 static void place_new_loop (struct loops *, struct loop *);
48 static void scale_loop_frequencies (struct loop *, int, int);
49 static basic_block create_preheader (struct loop *, int);
50 static void unloop (struct loops *, struct loop *, bool *);
[all …]
H A Dcfgloop.h1 /* Natural loop functions
46 /* The structure describing a bound on number of iterations of a loop. */
53 a loop. */
58 /* Structure to hold information for each natural loop. */
59 struct loop struct
64 /* Basic block of loop header. */ argument
67 /* Basic block of loop latch. */ argument
70 /* For loop unrolling/peeling decision. */ argument
73 /* Number of loop insns. */ argument
79 /* Number of blocks contained within the loop. */ argument
[all …]
H A Dloop-unroll.c1 /* Loop unrolling and peeling.
37 /* This pass performs loop unrolling and peeling. We only perform these
48 exception, as this causes loop to be cancelled completely and
68 how many times we should unroll the loop; the experiments I have made
104 the unrolled loop. */
113 basic_block loop_exit; /* The loop exit basic block. */
114 basic_block loop_preheader; /* The loop preheader basic block. */
119 static void decide_peel_simple (struct loop *, int);
120 static void decide_peel_once_rolling (struct loop *, int);
121 static void decide_peel_completely (struct loop *, int);
[all …]
H A Dtree-ssa-loop-ivcanon.c33 loop completely, we do it right here to expose the optimization
69 /* Adds a canonical induction variable to LOOP iterating NITER times. EXIT
73 create_canonical_iv (struct loop *loop, edge exit, tree niter) in create_canonical_iv() argument
82 fprintf (dump_file, "Added canonical iv to loop %d, ", loop->num); in create_canonical_iv()
104 NULL_TREE, loop, in create_canonical_iv()
114 /* Computes an estimated number of insns in LOOP. */
117 tree_num_loop_insns (struct loop *loop) in tree_num_loop_insns() argument
119 basic_block *body = get_loop_body (loop); in tree_num_loop_insns()
123 for (i = 0; i < loop->num_nodes; i++) in tree_num_loop_insns()
131 /* Estimate number of insns of completely unrolled loop. We assume
[all …]
H A Dtree-vectorizer.c1 /* Loop Vectorization
22 /* Loop Vectorization Pass.
29 For example, the vectorizer transforms the following simple loop:
72 loop, as well as general information about the loop as a whole, which is
73 recorded in a "loop_vec_info" struct attached to each loop.
77 The loop transformation phase scans all the stmts in the loop, and
79 the loop that needs to be vectorized. It insert the vector code sequence
150 Simple Loop Peeling Utilities
152 static struct loop *slpeel_tree_duplicate_loop_to_edge_cfg
153 (struct loop *, struct loops *, edge);
[all …]
H A Dtree-ssa-loop-im.c1 /* Loop invariant motion.
78 struct loop *max_loop; /* The outermost loop in that the statement
81 struct loop *tgt_loop; /* The loop out of that we want to move the
84 struct loop *always_executed_in;
85 /* The outermost loop for that we are sure
86 the statement is executed if the loop
97 out of the loop when this statement is
100 MAX_LOOP loop. */
123 in the loop. */
139 /* The outermost loop for that execution of the header guarantees that the
[all …]
H A Dtree-ssa-loop-unswitch.c1 /* Loop unswitching.
40 /* This file implements the loop unswitching, i.e. transformation of loops like
53 where inv is the loop invariant, into
73 tree-ssa-loop-im.c ensures that all the suitable conditions are in this
76 static struct loop *tree_unswitch_loop (struct loops *, struct loop *, basic_block,
78 static bool tree_unswitch_single_loop (struct loops *, struct loop *, int);
79 static tree tree_may_unswitch_on (basic_block, struct loop *);
81 /* Main entry point. Perform loop unswitching on all suitable LOOPS. */
87 struct loop *loop; in tree_ssa_unswitch_loops() local
95 /* Removed loop? */ in tree_ssa_unswitch_loops()
[all …]
H A Dtree-if-conv.c27 o Decide if a loop is if-convertible or not.
28 o Walk all loop basic blocks in breadth first order (BFS order).
106 static tree tree_if_convert_stmt (struct loop *loop, tree, tree,
108 static void tree_if_convert_cond_expr (struct loop *, tree, tree,
110 static bool if_convertible_phi_p (struct loop *, basic_block, tree);
111 static bool if_convertible_modify_expr_p (struct loop *, basic_block, tree);
112 static bool if_convertible_stmt_p (struct loop *, basic_block, tree);
113 static bool if_convertible_bb_p (struct loop *, basic_block, basic_block);
114 static bool if_convertible_loop_p (struct loop *, bool);
116 static tree add_to_dst_predicate_list (struct loop * loop, edge,
[all …]
H A Dloop-unswitch.c1 /* Loop unswitching for GNU compiler.
35 /* This pass moves constant conditions out of loops, duplicating the loop
50 where nothing inside the loop alters cond is transformed
75 Duplicating the loop might lead to code growth exponential in number of
76 branches inside loop, so we limit the number of unswitchings performed
77 in a single loop to PARAM_MAX_UNSWITCH_LEVEL. We only perform the
82 static struct loop *unswitch_loop (struct loops *, struct loop *,
84 static void unswitch_single_loop (struct loops *, struct loop *, rtx, int);
85 static rtx may_unswitch_on (basic_block, struct loop *, rtx *);
138 /* Main entry point. Perform loop unswitching on all suitable LOOPS. */
[all …]
/openbsd-src/gnu/usr.bin/gcc/gcc/
H A Dcfgloop.c1 /* Natural loop discovery code for GNU compiler.
29 considered to belong to inner loop with same header. */
34 static void flow_loop_entry_edges_find PARAMS ((struct loop *));
35 static void flow_loop_exit_edges_find PARAMS ((struct loop *));
36 static int flow_loop_nodes_find PARAMS ((basic_block, struct loop *));
37 static void flow_loop_pre_header_scan PARAMS ((struct loop *));
40 static int flow_loop_level_compute PARAMS ((struct loop *));
47 static void flow_loop_free PARAMS ((struct loop *));
49 /* Dump loop related CFG information. */
93 /* Return nonzero if the nodes of LOOP are a subset of OUTER. */
[all …]
H A Ddoloop.c27 #include "loop.h"
37 It first validates whether the loop is well behaved and has a
39 It then modifies the loop to use a low-overhead looping pattern as
42 1. A pseudo register is allocated as the loop iteration counter.
44 2. The number of loop iterations is calculated and is stored
45 in the loop counter.
47 3. At the end of the loop, the jump insn is replaced by the
49 used elsewhere. If the loop-variable or condition register are
53 loop.
64 PARAMS ((const struct loop *, rtx));
[all …]
H A Dloop.h1 /* Loop optimization definitions for GNU C-Compiler
33 /* Get the loop info pointer of a loop. */
34 #define LOOP_INFO(LOOP) ((struct loop_info *) (LOOP)->aux) argument
36 /* Get a pointer to the loop movables structure. */
37 #define LOOP_MOVABLES(LOOP) (&LOOP_INFO (LOOP)->movables) argument
39 /* Get a pointer to the loop registers structure. */
40 #define LOOP_REGS(LOOP) (&LOOP_INFO (LOOP)->regs) argument
42 /* Get a pointer to the loop induction variables structure. */
43 #define LOOP_IVS(LOOP) (&LOOP_INFO (LOOP)->ivs) argument
46 of an insn added during loop, since these don't have LUIDs. */
[all …]
/openbsd-src/gnu/llvm/llvm/docs/
H A DTransformMetadata.rst34 Attributes can be attached to loops as described in :ref:`llvm.loop`.
35 Attributes can describe properties of the loop, disable transformations,
40 metadata), in order to add or remove a loop attributes, a new ``MDNode``
41 must be created and assigned as the new ``llvm.loop`` metadata. Any
42 connection between the old ``MDNode`` and the loop is lost. The
43 ``llvm.loop`` node is also used as LoopID (``Loop::getLoopID()``), i.e.
44 the loop effectively gets a new identifier. For instance,
47 loop attributes, any ``llvm.mem.parallel_loop_access`` reference must be
54 loop distribution, etc.). They can either be a hint to the optimizer
57 ``#pragma clang loop`` or ``#pragma omp simd``).
[all …]
H A DLoopTerminology.rst4 LLVM Loop Terminology (and Canonical Forms)
10 Loop Definition
17 A loop is a subset of nodes from the control-flow graph (CFG; where
21 edges from the CFG within the loop) is strongly connected
26 all nodes in the loop (i.e. every execution path to any of the loop's
29 3. The loop is the maximum subset with these properties. That is, no
34 In computer science literature, this is often called a *natural loop*.
42 The definition of a loop comes with some additional terminology:
44 * An **entering block** (or **loop predecessor**) is a non-loop node
45 that has an edge into the loop (necessarily the header). If there is
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/
H A DLoopInfo.h1 //===- llvm/Analysis/LoopInfo.h - Natural Loop Calculator -------*- C++ -*-===//
10 // and determine the loop depth of various nodes of the CFG. A natural loop
15 // each natural loop identified, this analysis identifies natural loops
16 // contained entirely within the loop and the basic blocks the make up the loop.
20 // * whether there is a preheader for the loop
22 // * whether or not a particular block branches out of the loop
23 // * the successor blocks of the loop
24 // * the loop depth
29 // this analysis will not recognize and that will not be represented by a Loop
30 // instance. In particular, a Loop might be inside such a non-loop SCC, or a
[all …]
H A DLoopNestAnalysis.h10 /// 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 &OuterLoop,
57 const Loop &InnerLoop,
60 /// Return the maximum nesting depth of the loop nest rooted by loop \p Root.
[all …]
H A DLoopCacheAnalysis.h10 /// 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's index variable used in all other
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Scalar/
H A DLoopPassManager.h1 //===- 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
59 std::declval<Loop &>(), std::declval<LoopAnalysisManager &>(),
69 class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
72 PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Utils/
H A DLoopUtils.h1 //===- llvm/Transforms/Utils/LoopUtils.h - Loop utilities -------*- C++ -*-===//
9 // This file defines some loop transformation utilities.
32 class Loop; variable
53 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI,
56 /// Ensure that all exit blocks of the loop are dedicated exits.
58 /// For any loop exit block with non-loop predecessors, we split the loop
59 /// predecessors to use a dedicated loop exit block. We update the dominator
60 /// tree and loop info if provided, and will preserve LCSSA if requested.
61 bool formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI,
65 /// innermost containing loop.
[all …]
/openbsd-src/gnu/gcc/gcc/doc/
H A Dloop.texi7 @c Loop Representation
10 @node Loop Analysis and Representation
16 RTL, as well as the interfaces to loop-related analyses (induction
20 * Loop representation:: Representation and analysis of loops.
21 * Loop querying:: Getting information about loops.
22 * Loop manipulation:: Loop manipulation functions.
23 * LCSSA:: Loop-closed SSA form.
25 * loop-iv:: Induction variables on RTL.
28 * Lambda:: Linear loop transformations framework.
31 @node Loop representation
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/
H A DLoopVersioningLICM.cpp1 //===- 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 DLoopPassManager.cpp1 //===- 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 and all nested loops' analyses should in run()
40 // be preserved, but unrolling should invalidate the parent loop's analyses. in run()
41 PA.preserveSet<AllAnalysesOn<Loop>>(); in run()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Analysis/
H A DLoopNestAnalysis.cpp1 //===- 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 …]
/openbsd-src/gnu/llvm/clang/lib/CodeGen/
H A DCGLoopInfo.h1 //===---- 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 …]

12345678910>>...137