Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:42

0001 //===- LoopStrengthReduce.h - Loop Strength Reduce Pass ---------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This transformation analyzes and transforms the induction variables (and
0010 // computations derived from them) into forms suitable for efficient execution
0011 // on the target.
0012 //
0013 // This pass performs a strength reduction on array references inside loops that
0014 // have as one or more of their components the loop induction variable, it
0015 // rewrites expressions to take advantage of scaled-index addressing modes
0016 // available on the target, and it performs a variety of other optimizations
0017 // related to loop induction variables.
0018 //
0019 //===----------------------------------------------------------------------===//
0020 
0021 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
0022 #define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
0023 
0024 #include "llvm/Analysis/LoopAnalysisManager.h"
0025 #include "llvm/IR/PassManager.h"
0026 
0027 namespace llvm {
0028 
0029 class Loop;
0030 class LPMUpdater;
0031 
0032 /// Performs Loop Strength Reduce Pass.
0033 class LoopStrengthReducePass : public PassInfoMixin<LoopStrengthReducePass> {
0034 public:
0035   PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
0036                         LoopStandardAnalysisResults &AR, LPMUpdater &U);
0037 };
0038 
0039 } // end namespace llvm
0040 
0041 #endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H