1 //===- LoopStrengthReduce.h - Loop Strength Reduce Pass -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This transformation analyzes and transforms the induction variables (and
11 // computations derived from them) into forms suitable for efficient execution
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.
20 //===----------------------------------------------------------------------===//
22 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
23 #define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
25 #include "llvm/Analysis/LoopInfo.h"
26 #include "llvm/IR/PassManager.h"
27 #include "llvm/Transforms/Scalar/LoopPassManager.h"
31 /// Performs Loop Strength Reduce Pass.
32 class LoopStrengthReducePass : public PassInfoMixin<LoopStrengthReducePass> {
34 PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
35 LoopStandardAnalysisResults &AR, LPMUpdater &U);
37 } // end namespace llvm
39 #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H