1 //===-- InductionVars.h - Induction Variable Recognition ---------*- C++ -*--=//
3 // This family of functions is useful for Induction variable recognition,
4 // removal and optimizations.
6 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_OPT_INDUCTION_VARS_H
9 #define LLVM_OPT_INDUCTION_VARS_H
11 #include "llvm/Pass.h"
12 namespace cfg { class IntervalPartition; }
14 struct InductionVariableCannonicalize : public MethodPass {
15 // doInductionVariableCannonicalize - Simplify induction variables in loops
17 static bool doIt(Function *M, cfg::IntervalPartition &IP);
19 virtual bool runOnMethod(Function *M);
21 // getAnalysisUsageInfo - Declare that we need IntervalPartitions
22 void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
23 Pass::AnalysisSet &Destroyed,
24 Pass::AnalysisSet &Provided);