b652f33712f6a5bd55393e8a06179890813fb204
[oota-llvm.git] / include / llvm / Transforms / RaisePointerReferences.h
1 //===-- LevelChange.h - Passes for raising/lowering llvm code ----*- C++ -*--=//
2 //
3 // This family of passes is useful for changing the 'level' of a module. This
4 // can either be raising (f.e. converting direct addressing to use getelementptr
5 // for structs and arrays), or lowering (for instruction selection).
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_TRANSFORMS_LEVELCHANGE_H
10 #define LLVM_TRANSFORMS_LEVELCHANGE_H
11
12 #include "llvm/Pass.h"
13
14 // RaisePointerReferences - Try to eliminate as many pointer arithmetic
15 // expressions as possible, by converting expressions to use getelementptr and
16 // friends.
17 //
18 struct RaisePointerReferences : public MethodPass {
19   static bool doit(Method *M);
20
21   virtual bool runOnMethod(Method *M) { return doit(M); }
22 };
23
24
25 // EliminateAuxillaryInductionVariables - Eliminate all aux indvars.  This
26 // converts all induction variables to reference a cannonical induction
27 // variable (which starts at 0 and counts by 1).
28 //
29 struct EliminateAuxillaryInductionVariables : public MethodPass {
30   static bool doit(Method *M) { return false; } // TODO!
31
32   virtual bool runOnMethod(Method *M) { return doit(M); }
33 };
34
35 #endif