1 //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
3 // This file defines interfaces to access the target independent code generation
4 // passes provided by the LLVM backend.
6 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_CODEGEN_PASSES_H
9 #define LLVM_CODEGEN_PASSES_H
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);
20 extern const PassInfo *PHIEliminationID;
22 enum RegAllocName { simple, local };
24 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
25 /// from SSA form to use explicit registers by spilling every register. Wow,
28 FunctionPass *createSimpleRegisterAllocator();
30 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
31 /// basic block at a time, yielding code better than the simple register
32 /// allocator, but not as good as a global allocator.
34 FunctionPass *createLocalRegisterAllocator();
36 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
37 /// and eliminates abstract frame references.
39 FunctionPass *createPrologEpilogCodeInserter();
42 /// getRegisterAllocator - This creates an instance of the register allocator
44 FunctionPass *getRegisterAllocator(TargetMachine &T);