[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / Transforms / Scalar / LoopStrengthReduce.h
blob5cf805bc49393a8a9a2ac8f298a2bef127a02e82
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.
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"
27 namespace llvm {
29 class Loop;
30 class LPMUpdater;
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);
39 } // end namespace llvm
41 #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H