1 //===- LoopStrengthReduce.h - Loop Strength Reduce Pass ---------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This transformation analyzes and transforms the induction variables (and
10 // computations derived from them) into forms suitable for efficient execution
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.
19 //===----------------------------------------------------------------------===//
21 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
22 #define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
24 #include "llvm/Analysis/LoopAnalysisManager.h"
25 #include "llvm/IR/PassManager.h"
32 /// Performs Loop Strength Reduce Pass.
33 class LoopStrengthReducePass
: public PassInfoMixin
<LoopStrengthReducePass
> {
35 PreservedAnalyses
run(Loop
&L
, LoopAnalysisManager
&AM
,
36 LoopStandardAnalysisResults
&AR
, LPMUpdater
&U
);
39 } // end namespace llvm
41 #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H