/llvm-project/mlir/lib/Dialect/Affine/Transforms/ |
H A D | LoopUnroll.cpp | 86 SmallVectorImpl<AffineForOp> &loops) { in gatherInnermostLoops() argument 89 loops.push_back(forOp); in gatherInnermostLoops() 100 SmallVector<AffineForOp, 4> loops; in runOnOperation() local 108 loops.push_back(forOp); in runOnOperation() 110 for (auto forOp : loops) in runOnOperation() 116 SmallVector<AffineForOp, 4> loops; in runOnOperation() local 118 loops.clear(); in runOnOperation() 119 gatherInnermostLoops(func, loops); in runOnOperation() 120 if (loops.empty()) in runOnOperation() 123 for (auto forOp : loops) in runOnOperation()
|
H A D | SuperVectorize.cpp | 9 // This file implements vectorization of loops, operations and data types to 74 /// 1. the associated loops have dependency semantics that do not prevent 76 /// 2. the associate loops have been sliced in chunks of static sizes that are 78 /// 3. the inner loops, in the unroll-and-jam analogy of 2, are captured by 118 /// 1. at the MLIR level into a combination of loops, unrolling, DmaStartOp + 158 /// references along fastest varying dimensions and loops with recursive nested 250 /// loops that have a. conformable loop annotations attached (e.g. parallel, 257 /// a. applying iterative rewriting of the loops and all their nested 259 /// coarsening the loops and converting operations and operands to their 270 /// * Uniform operands (only induction variables of loops no 1535 getMatchedAffineLoopsRec(NestedMatch match,unsigned currentLevel,std::vector<SmallVector<AffineForOp,2>> & loops) getMatchedAffineLoopsRec() argument 1555 getMatchedAffineLoops(NestedMatch match,std::vector<SmallVector<AffineForOp,2>> & loops) getMatchedAffineLoops() argument 1562 vectorizeLoopNest(std::vector<SmallVector<AffineForOp,2>> & loops,const VectorizationStrategy & strategy) vectorizeLoopNest() argument 1688 vectorizeLoops(Operation * parentOp,DenseSet<Operation * > & loops,ArrayRef<int64_t> vectorSizes,ArrayRef<int64_t> fastestVaryingPattern,const ReductionLoopMap & reductionLoops) vectorizeLoops() argument 1800 verifyLoopNesting(const std::vector<SmallVector<AffineForOp,2>> & loops) verifyLoopNesting() argument 1841 vectorizeAffineLoops(Operation * parentOp,DenseSet<Operation * > & loops,ArrayRef<int64_t> vectorSizes,ArrayRef<int64_t> fastestVaryingPattern,const ReductionLoopMap & reductionLoops) vectorizeAffineLoops() argument 1886 vectorizeAffineLoopNest(std::vector<SmallVector<AffineForOp,2>> & loops,const VectorizationStrategy & strategy) vectorizeAffineLoopNest() argument [all...] |
/llvm-project/llvm/test/CodeGen/PowerPC/ |
H A D | ppc-passname-assert.ll | 3 ; Test pass name: ppc-ctr-loops-verify. 4 …werpc64le-unknown-unknown < %s -debug-pass=Structure -stop-before=ppc-ctr-loops-verify -o /dev/nul… 5 ; STOP-BEFORE-CTR-LOOPS-VERIFY-NOT: -ppc-ctr-loops-verify 6 ; STOP-BEFORE-CTR-LOOPS-VERIFY-NOT: "ppc-ctr-loops-verify" pass is not registered. 9 …owerpc64le-unknown-unknown < %s -debug-pass=Structure -stop-after=ppc-ctr-loops-verify -o /dev/nul… 10 ; STOP-AFTER-CTR-LOOPS-VERIFY: -ppc-ctr-loops-verify 11 ; STOP-AFTER-CTR-LOOPS-VERIFY-NOT: "ppc-ctr-loops-verify" pass is not registered.
|
/llvm-project/llvm/test/Transforms/SimpleLoopUnswitch/ |
H A D | exponential-nontrivial-unswitch.ll | 7 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 11 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 15 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 19 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 28 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 32 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 35 ; siblings multiplier for top-level loops (toplevel-div == 8) we should get 41 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 45 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 52 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… [all …]
|
H A D | exponential-nontrivial-unswitch2.ll | 9 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 13 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 17 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 21 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 24 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 29 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 33 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 37 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 41 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 44 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi…
|
H A D | exponential-nontrivial-unswitch-nested2.ll | 12 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 16 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 20 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 24 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 27 ; (unscaled candidates == 2) we start getting some unswitches in outer loops, 36 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 44 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 50 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 61 ; Half unswitched loop nests, with unscaled3 and div1 it gets less depth1 loops unswitched 70 ; Half unswitched loop nests, with unscaled3 and div2 it gets more depth1 loops unswitched
|
H A D | exponential-nontrivial-unswitch-nested.ll | 7 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 11 ; RUN: -passes='loop(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | FileChe… 15 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 19 ; RUN: -passes='loop-mssa(simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1 | Fi… 31 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 39 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 47 ; RUN: -passes='loop-mssa(licm,simple-loop-unswitch<nontrivial>),print<loops>' -disable-output 2>&1… 56 ; Half unswitched loop nests, with unscaled4 and div1 it gets less depth1 loops unswitched 63 ; Half unswitched loop nests, with unscaled4 and div2 it gets more depth1 loops unswitched
|
/llvm-project/mlir/include/mlir/Dialect/SCF/Transforms/ |
H A D | Passes.td | 25 let summary = "Peel `for` loops at their upper bounds."; 33 "Do not peel loops inside of the last, partial iteration of another " 40 let summary = "Specialize `for` loops for vectorization"; 45 let summary = "Fuse adjacent parallel loops"; 50 let summary = "Test parallel loops collapsing transformation"; 94 let summary = "Specialize parallel loops for vectorization"; 99 let summary = "Tile parallel loops"; 103 "Factors to tile parallel loops by">, 107 "inside the internal loops"> 118 let summary = "Convert SCF forall loops t [all...] |
H A D | TileUsingInterface.h | 38 /// size of the returned vector is smaller than the number of loops, the inner 39 /// loops are not tiled. If the size of the returned vector is larger, then 40 /// the vector is truncated to number of loops. 56 /// loops, the inner loops are not tiled. If the size of the returned vector 57 /// is larger, then the vector is truncated to number of loops. Note: This 73 /// The interchange vector to reorder the tiled loops. in setMapping() 118 /// Specify mapping of loops to devices. This is only respected when the loop 138 SmallVector<LoopLikeOpInterface> loops; 212 MutableArrayRef<LoopLikeOpInterface> loops); member 84 SmallVector<LoopLikeOpInterface> loops; global() member 274 SmallVector<LoopLikeOpInterface> loops; global() member [all...] |
/llvm-project/mlir/lib/Dialect/SCF/Transforms/ |
H A D | TileUsingInterface.cpp | 158 /// Checks if any of the tiled loops are not parallel. in generateLoopNestUsingForOp() 164 "expected as many tile size values as number of loops"); in generateLoopNestUsingForOp() 246 /// innermost loop body of the generated tiled loops corresponds to. in generateLoopNestUsingForallOp() 336 /// Function to return the bounds of the loops to be generated. in yieldTiledValuesAndReplaceLoop() 389 /// - `tileSizes` is the tile sizes to use. Zero represent untiled loops. in yieldTiledValuesAndReplaceLoop() 394 /// - `loops` is an in-out parameter into which the generated loops are in yieldTiledValuesAndReplaceLoop() 400 SmallVector<LoopLikeOpInterface> &loops) { in yieldTiledValuesAndReplaceLoop() 422 loops.push_back(loop); in yieldTiledValuesAndReplaceLoop() 435 if (loops in yieldTiledValuesAndReplaceLoop() 150 generateLoopNestUsingForOp(RewriterBase & rewriter,Location loc,ArrayRef<Range> loopRanges,ArrayRef<OpFoldResult> tileSizes,ValueRange destinationTensors,YieldTiledValuesFn yieldTiledValuesFn,SmallVector<LoopLikeOpInterface> & loops) generateLoopNestUsingForOp() argument 229 generateLoopNestUsingForallOp(RewriterBase & rewriter,Location loc,ArrayRef<Range> loopRanges,ArrayRef<OpFoldResult> tileSizes,ArrayRef<Attribute> mappingVector,ValueRange destinationTensors,YieldTiledValuesFn tiledBodyFn,SmallVector<LoopLikeOpInterface> & loops) generateLoopNestUsingForallOp() argument 295 generateLoopNest(RewriterBase & rewriter,Location loc,const scf::SCFTilingOptions & options,ArrayRef<Range> loopRanges,ArrayRef<OpFoldResult> tileSizes,ValueRange destinationTensors,YieldTiledValuesFn tiledBodyFn,SmallVector<LoopLikeOpInterface> & loops) generateLoopNest() argument 462 addInitOperandsToLoopNest(RewriterBase & rewriter,MutableArrayRef<LoopLikeOpInterface> loops,ValueRange newInitValues,YieldTiledValuesFn getNewTiledYieldsFn) addInitOperandsToLoopNest() argument 666 SmallVector<LoopLikeOpInterface> loops; tileUsingSCF() local 780 SmallVector<LoopLikeOpInterface> loops; tileReductionUsingScf() local 820 getUntiledProducerFromSliceSource(OpOperand * source,ArrayRef<LoopLikeOpInterface> loops) getUntiledProducerFromSliceSource() argument 840 tileAndFuseProducerOfSlice(RewriterBase & rewriter,tensor::ExtractSliceOp candidateSliceOp,MutableArrayRef<LoopLikeOpInterface> loops) tileAndFuseProducerOfSlice() argument 956 yieldReplacementForFusedProducer(RewriterBase & rewriter,tensor::ExtractSliceOp sliceOp,scf::SCFFuseProducerOfSliceResult fusedProducerInfo,MutableArrayRef<LoopLikeOpInterface> loops,ArrayRef<unsigned> yieldResultNumber) yieldReplacementForFusedProducer() argument 1099 auto &loops = tilingResult->loops; tileConsumerAndFuseProducersUsingSCF() local 1617 SmallVector<scf::ForOp> loops; lowerToLoopsUsingSCFForOp() local [all...] |
/llvm-project/mlir/lib/Dialect/SCF/Utils/ |
H A D | Utils.cpp | 89 // The outer loops are modified by calling this method recursively in replaceLoopNestWithNewYields() 501 /// Check if bounds of all inner loops are defined outside of `forOp` 563 // Collect inner loops. in loopUnrollJamByFactor() 652 // Fix iterOperands and yield op operands of newly created loops. in loopUnrollJamByFactor() 839 /// the linearized loop by the total number of iterations of the loops nested in coalesceLoops() 841 /// related to the outer loops): in coalesceLoops() 902 MutableArrayRef<scf::ForOp> loops) { in coalescePerfectlyNestedSCFForLoops() 903 if (loops.size() < 2) in coalescePerfectlyNestedSCFForLoops() 906 scf::ForOp innermost = loops.back(); in coalescePerfectlyNestedSCFForLoops() 907 scf::ForOp outermost = loops in coalescePerfectlyNestedSCFForLoops() 814 coalesceLoops(RewriterBase & rewriter,MutableArrayRef<scf::ForOp> loops) coalesceLoops() argument 879 coalesceLoops(MutableArrayRef<scf::ForOp> loops) coalesceLoops() argument 889 SmallVector<scf::ForOp> loops; coalescePerfectlyNestedSCFForLoops() local 963 collapseParallelLoops(RewriterBase & rewriter,scf::ParallelOp loops,ArrayRef<std::vector<unsigned>> combinedDimensions) collapseParallelLoops() argument 1199 for (auto loops : tile(forOps, sizes, ArrayRef<scf::ForOp>(target))) { tile() local [all...] |
/llvm-project/llvm/test/Transforms/HardwareLoops/ |
H A D | unexpected-inputs.ll | 1 ; RUN: opt -passes='hardware-loops<force-hardware-loops>' -S %s -o - | FileCheck %s --check-prefix=… 2 ; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1>' -S %s -o - | Fi… 3 ; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-counter-bitwidth=32>' -S %s -…
|
H A D | unconditional-latch.ll | 1 ; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-cou… 2 ; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-cou… 3 ; RUN: opt -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-cou…
|
H A D | unscevable.ll | 1 ; RUN: opt -passes=hardware-loops -force-hardware-loops=true -hardware-loop-decrement=1 -hardware-l… 2 ; RUN: opt -passes=hardware-loops -force-hardware-loops=true -hardware-loop-decrement=1 -hardware-l… 3 ; RUN: opt -passes=hardware-loops -force-hardware-loops=true -hardware-loop-decrement=1 -hardware-l…
|
/llvm-project/llvm/test/MC/Hexagon/PacketRules/ |
H A D | endloop_branches.s | 5 # CHECK: 4:1: error: Branches cannot be in a packet with hardware loops 9 # CHECK: 8:1: error: Branches cannot be in a packet with hardware loops 13 # CHECK: 12:1: error: Branches cannot be in a packet with hardware loops 17 # CHECK: 16:1: error: Branches cannot be in a packet with hardware loops
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
H A D | infinite-loop.rst | 6 Finds obvious infinite loops (loops where the condition variable is not changed 9 Finding infinite loops is well-known to be impossible (halting problem). 10 However, it is possible to detect some obvious infinite loops, for example, if 11 the loop condition is not changed. This check detects such loops. A loop is
|
/llvm-project/flang/test/Semantics/ |
H A D | cuf09.cuf | 124 !ERROR: !$CUF KERNEL DO (1) must be followed by a DO construct with tightly nested outer levels of counted DO loops 128 !ERROR: !$CUF KERNEL DO (1) must be followed by a DO construct with tightly nested outer levels of counted DO loops 153 !ERROR: !$CUF KERNEL DO (1) must be followed by a DO construct with tightly nested outer levels of counted DO loops 156 !ERROR: !$CUF KERNEL DO (2) must be followed by a DO construct with tightly nested outer levels of counted DO loops 160 !ERROR: !$CUF KERNEL DO (2) must be followed by a DO construct with tightly nested outer levels of counted DO loops 165 !ERROR: !$CUF KERNEL DO (2) must be followed by a DO construct with tightly nested outer levels of counted DO loops
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/altera/ |
H A D | unroll-loops.rst | 1 .. title:: clang-tidy - altera-unroll-loops 3 altera-unroll-loops 6 Finds inner loops that have not been unrolled, as well as fully unrolled loops 9 Unrolling inner loops could improve the performance of OpenCL kernels. However, 19 - In ``for`` loops, our check only works with simple arithmetic increments ( 32 for (int i = 0; i < 10; i++) { // ok: outer loops should not be unrolled
|
/llvm-project/polly/test/ScopDetect/ |
H A D | non-affine-loop.ll | 1 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false … 2 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true … 3 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -polly-… 4 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-… 5 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-… 9 ; non-affine loops __and__ accesses __and__ allow regions without a (affine) loop we will
|
/llvm-project/mlir/docs/Tutorials/transform/ |
H A D | ChH.md | 131 variables in Halide DSL correspond to implicit loops iterating over the 133 their definitions also share the corresponding loops. In other words, the loop 157 --one-shot-bufferize --convert-linalg-to-loops`) 217 * `split` decomposes a loop dimension into two immediately nested loops with 226 * `reorder` rearranges the loops arbitrarily. In Linalg representation, loops 228 microkernels. The order of implicit loops in a `linalg.generic` operation 232 dimensions and not the explicit loops materialized by tiling operations that 234 leverage this behavior by materializing loops directly in the desired order 249 on the relation between loops surrounding functions, this corresponds to 253 that operates on `forall` loops materialized by tiling beforehand. [all …]
|
/llvm-project/mlir/test/Dialect/GPU/ |
H A D | promotion.mlir | 22 // Verify that loops for the copy are emitted. We only check the number of 23 // loops here since their bounds are produced by mapLoopToProcessorIds, 29 // Verify that the copy is emitted and uses only the last two loops. 38 // Verify that loops for the copy are emitted. We only check the number of 39 // loops here since their bounds are produced by mapLoopToProcessorIds, 45 // Verify that the copy is emitted and uses only the last two loops. 76 // Verify that loops for the copy are emitted. 91 // Verify that loop loops for the copy are emitted.
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/modernize/ |
H A D | loop-convert.rst | 6 This check converts ``for(...; ...; ...)`` loops to use the new range-based 7 loops in C++11. 9 Three kinds of loops can be converted: 21 In loops where the container expression is more complex than just a 25 Transformations for these loops are marked as `risky`, and thus will only 40 :ref:`Range-based loops evaluate end() only once<IncorrectRiskyTransformation>` 61 Any other loops that do not match the above criteria to be marked as 136 The converter is also capable of transforming iterator loops which use 145 When set to true convert loops when in C++20 or later mode using 193 Range-based loops evaluate end() only once [all …]
|
/llvm-project/mlir/lib/Dialect/Affine/Utils/ |
H A D | LoopUtils.cpp | 239 // better way to pipeline for such loops is to first tile them and extract in affineForOpBodySkew() 337 // and their loops completed. in affineForOpBodySkew() 395 LLVM_DEBUG(llvm::dbgs() << "input loops not perfectly nested"); in performPreTilingChecks() 428 // The outermost among the loops as we add more.. in constructTiledLoopNest() 432 // Add intra-tile (or point) loops. in constructTiledLoopNest() 446 // Add tile space loops; in constructTiledLoopNest() 462 /// Set lower and upper bounds of intra-tile loops for parametric tiling. in setIntraTileBoundsParametric() 477 "expected input loops to have constant lower bound."); in setIntraTileBoundsParametric() 557 /// Set lower and upper bounds of inter-tile loops for parametric tiling. in setInterTileBoundsParametric() 563 // The lower bounds for inter-tile loops ar in setInterTileBoundsParametric() 1316 checkLoopInterchangeDependences(const std::vector<SmallVector<DependenceComponent,2>> & depCompsVec,ArrayRef<AffineForOp> loops,ArrayRef<unsigned> loopPermMap) checkLoopInterchangeDependences() argument 1349 isValidLoopInterchangePermutation(ArrayRef<AffineForOp> loops,ArrayRef<unsigned> loopPermMap) isValidLoopInterchangePermutation() argument 1362 isPerfectlyNested(ArrayRef<AffineForOp> loops) isPerfectlyNested() argument 1455 SmallVector<AffineForOp, 4> loops; sinkSequentialLoops() local 1601 for (auto loops : tile(forOps, sizes, ArrayRef<AffineForOp>(target))) { tile() local 1608 coalesceLoops(MutableArrayRef<AffineForOp> loops) coalesceLoops() argument 2541 createSeparationCondition(MutableArrayRef<AffineForOp> loops,OpBuilder b) createSeparationCondition() argument 2732 SmallVector<AffineForOp> loops; coalescePerfectlyNestedAffineLoops() local [all...] |
/llvm-project/compiler-rt/test/tsan/ |
H A D | compare_exchange_acquire_fence.cpp | 17 constexpr int loops = 100000; variable 20 for (int i = 0; i < loops; ++i) { in Thread1() 32 for (int i = 0; i < loops; ++i) { in main()
|
/llvm-project/llvm/test/Transforms/LoopUnroll/ |
H A D | revisit.ll | 1 ; This test checks that nested loops are revisited in various scenarios when 10 ; loops, including the ones that used to be child loops. 54 ; Unrolling occurs, so we visit what were the inner loops twice over. First we 55 ; visit their clones, and then we visit the original loops re-parented.
|