a5dc323aa928009161dda0950b969e14c4f97ff9
[oota-llvm.git] / include / llvm / CodeGen / Passes.h
1 //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
2 //
3 // This file defines interfaces to access the target independent 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 class TargetMachine;
14
15 // PHIElimination pass - This pass eliminates machine instruction PHI nodes by
16 // inserting copy instructions.  This destroys SSA information, but is the
17 // desired input for some register allocators.  This pass is "required" by these
18 // register allocator like this:  AU.addRequiredID(PHIEliminationID);
19 //
20 extern const PassInfo *PHIEliminationID;
21
22 /// Creates a register allocator as the user specified on the command
23 /// line.
24 FunctionPass *createRegisterAllocator();
25
26 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
27 /// from SSA form to use explicit registers by spilling every register.  Wow,
28 /// great policy huh?
29 ///
30 FunctionPass *createSimpleRegisterAllocator();
31
32 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
33 /// basic block at a time, yielding code better than the simple register
34 /// allocator, but not as good as a global allocator.
35 /// 
36 FunctionPass *createLocalRegisterAllocator();
37
38 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
39 /// and eliminates abstract frame references.
40 ///
41 FunctionPass *createPrologEpilogCodeInserter();
42
43
44 /// getRegisterAllocator - This creates an instance of the register allocator
45 /// for the Sparc.
46 FunctionPass *getRegisterAllocator(TargetMachine &T);
47
48 #endif