Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | //===- LoopStrengthReduce.h - Loop Strength Reduce Pass ---------*- C++ -*-===// |
2 | // |
||
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
||
4 | // See https://llvm.org/LICENSE.txt for license information. |
||
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
||
6 | // |
||
7 | //===----------------------------------------------------------------------===// |
||
8 | // |
||
9 | // This transformation analyzes and transforms the induction variables (and |
||
10 | // computations derived from them) into forms suitable for efficient execution |
||
11 | // on the target. |
||
12 | // |
||
13 | // This pass performs a strength reduction on array references inside loops that |
||
14 | // have as one or more of their components the loop induction variable, it |
||
15 | // rewrites expressions to take advantage of scaled-index addressing modes |
||
16 | // available on the target, and it performs a variety of other optimizations |
||
17 | // related to loop induction variables. |
||
18 | // |
||
19 | //===----------------------------------------------------------------------===// |
||
20 | |||
21 | #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H |
||
22 | #define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H |
||
23 | |||
24 | #include "llvm/Analysis/LoopAnalysisManager.h" |
||
25 | #include "llvm/IR/PassManager.h" |
||
26 | |||
27 | namespace llvm { |
||
28 | |||
29 | class Loop; |
||
30 | class LPMUpdater; |
||
31 | |||
32 | /// Performs Loop Strength Reduce Pass. |
||
33 | class LoopStrengthReducePass : public PassInfoMixin<LoopStrengthReducePass> { |
||
34 | public: |
||
35 | PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, |
||
36 | LoopStandardAnalysisResults &AR, LPMUpdater &U); |
||
37 | }; |
||
38 | |||
39 | } // end namespace llvm |
||
40 | |||
41 | #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H |