2001-06-30 04:34:07 +00:00
|
|
|
//===-- InductionVars.h - Induction Variable Recognition ---------*- C++ -*--=//
|
|
|
|
//
|
|
|
|
// This family of functions is useful for Induction variable recognition,
|
|
|
|
// removal and optimizations.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_OPT_INDUCTION_VARS_H
|
|
|
|
#define LLVM_OPT_INDUCTION_VARS_H
|
|
|
|
|
2001-10-18 20:19:09 +00:00
|
|
|
#include "llvm/Pass.h"
|
2002-01-30 23:29:35 +00:00
|
|
|
namespace cfg { class IntervalPartition; }
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
struct InductionVariableCannonicalize : public MethodPass {
|
2001-10-18 05:21:56 +00:00
|
|
|
// doInductionVariableCannonicalize - Simplify induction variables in loops
|
|
|
|
//
|
2002-01-30 23:29:35 +00:00
|
|
|
static bool doIt(Method *M, cfg::IntervalPartition &IP);
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-01-30 23:29:35 +00:00
|
|
|
virtual bool runOnMethod(Method *M);
|
|
|
|
|
|
|
|
// getAnalysisUsageInfo - Declare that we need IntervalPartitions
|
|
|
|
void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
|
|
|
|
Pass::AnalysisSet &Destroyed,
|
|
|
|
Pass::AnalysisSet &Provided);
|
2001-10-18 01:31:58 +00:00
|
|
|
};
|
|
|
|
|
2001-06-30 04:34:07 +00:00
|
|
|
#endif
|