Factory methods for FunctionPasses now return type FunctionPass *.
[oota-llvm.git] / include / llvm / CodeGen / Passes.h
1 //===-- Passes.h - Target independant code generation passes ----*- C++ -*-===//
2 //
3 // This file defines interfaces to access the target independant code generation
4 // passes provided by the LLVM backend.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_CODEGEN_PASSES_H
9 #define LLVM_CODEGEN_PASSES_H
10
11 class FunctionPass;
12 class PassInfo;
13
14 // PHIElimination pass - This pass eliminates machine instruction PHI nodes by
15 // inserting copy instructions.  This destroys SSA information, but is the
16 // desired input for some register allocators.  This pass is "required" by these
17 // register allocator like this:  AU.addRequiredID(PHIEliminationID);
18 //
19 extern const PassInfo *PHIEliminationID;
20
21 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
22 /// from SSA form to use explicit registers by spilling every register.  Wow,
23 /// great policy huh?
24 ///
25 FunctionPass *createSimpleRegisterAllocator();
26
27 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
28 /// basic block at a time, yielding code better than the simple register
29 /// allocator, but not as good as a global allocator.
30 /// 
31 FunctionPass *createLocalRegisterAllocator();
32
33 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
34 /// and eliminates abstract frame references.
35 ///
36 FunctionPass *createPrologEpilogCodeInserter();
37
38 #endif