3b5360ef87cc99e208f26a5e741e933855e426ac
[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 class IntrinsicLowering;
25
26 /// createX86SimpleInstructionSelector - This pass converts an LLVM function
27 /// into a machine code representation in a very simple peep-hole fashion.  The
28 /// generated code sucks but the implementation is nice and simple.
29 ///
30 FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM);
31
32 /// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86
33 /// specific peephole optimizations.
34 ///
35 FunctionPass *createX86SSAPeepholeOptimizerPass();
36
37 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
38 /// optimizations.
39 ///
40 FunctionPass *createX86PeepholeOptimizerPass();
41
42 /// createX86FloatingPointKiller - This function returns a pass which
43 /// kills every floating point register at the end of each basic block
44 /// because our FloatingPointStackifier cannot handle them.
45 ///
46 FunctionPass *createX86FloatingPointKillerPass();
47
48 /// createX86FloatingPointStackifierPass - This function returns a pass which
49 /// converts floating point register references and pseudo instructions into
50 /// floating point stack references and physical instructions.
51 ///
52 FunctionPass *createX86FloatingPointStackifierPass();
53
54 /// createX86CodePrinterPass - Returns a pass that prints the X86
55 /// assembly code for a MachineFunction to the given output stream,
56 /// using the given target machine description.  This should work
57 /// regardless of whether the function is in SSA form.
58 ///
59 FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm);
60
61 /// createX86EmitCodeToMemory - Returns a pass that converts a register
62 /// allocated function into raw machine code in a dynamically
63 /// allocated chunk of memory.
64 ///
65 FunctionPass *createEmitX86CodeToMemory();
66
67 // Defines symbolic names for X86 registers.  This defines a mapping from
68 // register name to register number.
69 //
70 } // End llvm namespace
71
72 #include "X86GenRegisterNames.inc"
73
74 // Defines symbolic names for the X86 instructions.
75 //
76 #include "X86GenInstrNames.inc"
77
78 #endif