11fcf29013a8464f63d725d7a741b45ef794231c
[oota-llvm.git] / include / llvm / CodeGen / Passes.h
1 //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines interfaces to access the target independent code generation
11 // passes provided by the LLVM backend.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CODEGEN_PASSES_H
16 #define LLVM_CODEGEN_PASSES_H
17
18 namespace llvm {
19
20 class FunctionPass;
21 class PassInfo;
22 class TargetMachine;
23
24 // PHIElimination pass - This pass eliminates machine instruction PHI nodes by
25 // inserting copy instructions.  This destroys SSA information, but is the
26 // desired input for some register allocators.  This pass is "required" by these
27 // register allocator like this:  AU.addRequiredID(PHIEliminationID);
28 //
29 extern const PassInfo *PHIEliminationID;
30
31 /// Creates a register allocator as the user specified on the command
32 /// line.
33 FunctionPass *createRegisterAllocator();
34
35 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
36 /// from SSA form to use explicit registers by spilling every register.  Wow,
37 /// great policy huh?
38 ///
39 FunctionPass *createSimpleRegisterAllocator();
40
41 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
42 /// basic block at a time, yielding code better than the simple register
43 /// allocator, but not as good as a global allocator.
44 /// 
45 FunctionPass *createLocalRegisterAllocator();
46
47 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
48 /// and eliminates abstract frame references.
49 ///
50 FunctionPass *createPrologEpilogCodeInserter();
51
52
53 /// getRegisterAllocator - This creates an instance of the register allocator
54 /// for the Sparc.
55 FunctionPass *getRegisterAllocator(TargetMachine &T);
56
57 } // End llvm namespace
58
59 #endif