Added LLVM copyright header (for lack of a better term).
[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 class FunctionPass;
19 class PassInfo;
20 class TargetMachine;
21
22 // PHIElimination pass - This pass eliminates machine instruction PHI nodes by
23 // inserting copy instructions.  This destroys SSA information, but is the
24 // desired input for some register allocators.  This pass is "required" by these
25 // register allocator like this:  AU.addRequiredID(PHIEliminationID);
26 //
27 extern const PassInfo *PHIEliminationID;
28
29 /// Creates a register allocator as the user specified on the command
30 /// line.
31 FunctionPass *createRegisterAllocator();
32
33 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
34 /// from SSA form to use explicit registers by spilling every register.  Wow,
35 /// great policy huh?
36 ///
37 FunctionPass *createSimpleRegisterAllocator();
38
39 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
40 /// basic block at a time, yielding code better than the simple register
41 /// allocator, but not as good as a global allocator.
42 /// 
43 FunctionPass *createLocalRegisterAllocator();
44
45 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
46 /// and eliminates abstract frame references.
47 ///
48 FunctionPass *createPrologEpilogCodeInserter();
49
50
51 /// getRegisterAllocator - This creates an instance of the register allocator
52 /// for the Sparc.
53 FunctionPass *getRegisterAllocator(TargetMachine &T);
54
55 #endif