aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Optimizations/LevelChange.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-18 01:31:58 +0000
committerChris Lattner <sabre@nondot.org>2001-10-18 01:31:58 +0000
commit475369e255bbdd70de3fb870bbd9fae3d6b1038f (patch)
treecd718cac568ffe8b871a8645a21252b28da005e0 /include/llvm/Optimizations/LevelChange.h
parent6db0f4795cbd9b58add13c2b2f0c7124112ab9b7 (diff)
Convert optimizations to use the Pass infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Optimizations/LevelChange.h')
-rw-r--r--include/llvm/Optimizations/LevelChange.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Optimizations/LevelChange.h b/include/llvm/Optimizations/LevelChange.h
index 745b893d84..2afbb390dc 100644
--- a/include/llvm/Optimizations/LevelChange.h
+++ b/include/llvm/Optimizations/LevelChange.h
@@ -9,6 +9,7 @@
#ifndef LLVM_OPT_LEVELCHANGE_H
#define LLVM_OPT_LEVELCHANGE_H
+#include "llvm/Transforms/Pass.h"
#include "llvm/Module.h"
#include "llvm/Method.h"
@@ -50,6 +51,13 @@ namespace opt {
return DoRaiseRepresentation(M, Level::Highest);
}
+ struct RaiseRepresentation : public StatelessPass<RaiseRepresentation> {
+ inline static bool doPerMethodWork(Method *M) {
+ return DoRaiseRepresentation(M);
+ }
+ };
+
+
// DoEliminateAuxillaryInductionVariables - Eliminate all aux indvars. This
// is one of the transformations performed by DoRaiseRepresentation, that
// converts all induction variables to reference a cannonical induction