Add an option to enable the SSA based peephole optimizer.
[oota-llvm.git] / lib / Target / X86 / X86.h
1 //===-- X86.h - Top-level interface for X86 representation ------*- 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 contains the entry points for global functions defined in the x86
11 // target library, as used by the LLVM JIT.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef TARGET_X86_H
16 #define TARGET_X86_H
17
18 #include <iosfwd>
19
20 namespace llvm {
21
22 class TargetMachine;
23 class FunctionPass;
24
25 /// createX86SimpleInstructionSelector - This pass converts an LLVM function
26 /// into a machine code representation in a very simple peep-hole fashion.  The
27 /// generated code sucks but the implementation is nice and simple.
28 ///
29 FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM);
30
31 /// createX86PatternInstructionSelector - This pass converts an LLVM function
32 /// into a machine code representation using pattern matching and a machine
33 /// description file.
34 ///
35 FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM);
36
37 /// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86
38 /// specific peephole optimizations.
39 ///
40 FunctionPass *createX86SSAPeepholeOptimizerPass();
41
42 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
43 /// optimizations.
44 ///
45 FunctionPass *createX86PeepholeOptimizerPass();
46
47 /// createX86FloatingPointStackifierPass - This function returns a pass which
48 /// converts floating point register references and pseudo instructions into
49 /// floating point stack references and physical instructions.
50 ///
51 FunctionPass *createX86FloatingPointStackifierPass();
52
53 /// createX86CodePrinterPass - Returns a pass that prints the X86
54 /// assembly code for a MachineFunction to the given output stream,
55 /// using the given target machine description.  This should work
56 /// regardless of whether the function is in SSA form.
57 ///
58 FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm);
59
60 /// createX86EmitCodeToMemory - Returns a pass that converts a register
61 /// allocated function into raw machine code in a dynamically
62 /// allocated chunk of memory.
63 ///
64 FunctionPass *createEmitX86CodeToMemory();
65
66 // Defines symbolic names for X86 registers.  This defines a mapping from
67 // register name to register number.
68 //
69 } // End llvm namespace
70
71 #include "X86GenRegisterNames.inc"
72
73 // Defines symbolic names for the X86 instructions.
74 //
75 #include "X86GenInstrNames.inc"
76
77 #endif