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"
|
2001-06-30 04:34:07 +00:00
|
|
|
|
|
|
|
namespace opt {
|
|
|
|
|
2001-10-18 05:21:56 +00:00
|
|
|
struct InductionVariableCannonicalize : public Pass {
|
|
|
|
// doInductionVariableCannonicalize - Simplify induction variables in loops
|
|
|
|
//
|
|
|
|
static bool doIt(Method *M);
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2001-10-18 05:21:56 +00:00
|
|
|
virtual bool doPerMethodWork(Method *M) {
|
|
|
|
return doIt(M);
|
2001-10-18 01:31:58 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2001-06-30 04:34:07 +00:00
|
|
|
} // end namespace opt
|
|
|
|
|
|
|
|
#endif
|