1 //===-- LevelChange.h - Passes for raising/lowering llvm code ----*- C++ -*--=//
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).
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TRANSFORMS_LEVELCHANGE_H
10 #define LLVM_TRANSFORMS_LEVELCHANGE_H
12 #include "llvm/Pass.h"
14 // RaisePointerReferences - Try to eliminate as many pointer arithmetic
15 // expressions as possible, by converting expressions to use getelementptr and
18 struct RaisePointerReferences : public MethodPass {
19 static bool doit(Method *M);
21 virtual bool runOnMethod(Method *M) { return doit(M); }
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).
29 struct EliminateAuxillaryInductionVariables : public MethodPass {
30 static bool doit(Method *M) { return false; } // TODO!
32 virtual bool runOnMethod(Method *M) { return doit(M); }