Home | History | Annotate | Download | only in Scalar
      1 //===- LoopStrengthReduce.h - Loop Strength Reduce Pass ---------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // This transformation analyzes and transforms the induction variables (and
     11 // computations derived from them) into forms suitable for efficient execution
     12 // on the target.
     13 //
     14 // This pass performs a strength reduction on array references inside loops that
     15 // have as one or more of their components the loop induction variable, it
     16 // rewrites expressions to take advantage of scaled-index addressing modes
     17 // available on the target, and it performs a variety of other optimizations
     18 // related to loop induction variables.
     19 //
     20 //===----------------------------------------------------------------------===//
     21 
     22 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
     23 #define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
     24 
     25 #include "llvm/Analysis/LoopAnalysisManager.h"
     26 #include "llvm/IR/PassManager.h"
     27 
     28 namespace llvm {
     29 
     30 class Loop;
     31 class LPMUpdater;
     32 
     33 /// Performs Loop Strength Reduce Pass.
     34 class LoopStrengthReducePass : public PassInfoMixin<LoopStrengthReducePass> {
     35 public:
     36   PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
     37                         LoopStandardAnalysisResults &AR, LPMUpdater &U);
     38 };
     39 
     40 } // end namespace llvm
     41 
     42 #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
     43