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
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);
19 extern const PassInfo *PHIEliminationID;
21 /// SimpleRegisterAllocation Pass - This pass converts the input machine code
22 /// from SSA form to use explicit registers by spilling every register. Wow,
25 FunctionPass *createSimpleRegisterAllocator();
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.
31 FunctionPass *createLocalRegisterAllocator();
33 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
34 /// and eliminates abstract frame references.
36 FunctionPass *createPrologEpilogCodeInserter();
39 /// getRegisterAllocator - This creates an instance of the register allocator
41 FunctionPass *getRegisterAllocator(TargetMachine &T);