More refactoring.
[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 is distributed under the University of Illinois Open Source
6 // 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 "MCTargetDesc/X86BaseInfo.h"
19 #include "MCTargetDesc/X86MCTargetDesc.h"
20 #include "llvm/Support/DataTypes.h"
21 #include "llvm/Target/TargetMachine.h"
22
23 namespace llvm {
24
25 class FunctionPass;
26 class JITCodeEmitter;
27 class MachineCodeEmitter;
28 class MCCodeEmitter;
29 class MCContext;
30 class MCInstrInfo;
31 class MCObjectWriter;
32 class MCSubtargetInfo;
33 class Target;
34 class TargetAsmBackend;
35 class X86TargetMachine;
36 class formatted_raw_ostream;
37 class raw_ostream;
38
39 /// createX86ISelDag - This pass converts a legalized DAG into a 
40 /// X86-specific DAG, ready for instruction scheduling.
41 ///
42 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
43                                CodeGenOpt::Level OptLevel);
44
45 /// createGlobalBaseRegPass - This pass initializes a global base
46 /// register for PIC on x86-32.
47 FunctionPass* createGlobalBaseRegPass();
48
49 /// createX86FloatingPointStackifierPass - This function returns a pass which
50 /// converts floating point register references and pseudo instructions into
51 /// floating point stack references and physical instructions.
52 ///
53 FunctionPass *createX86FloatingPointStackifierPass();
54
55 /// createSSEDomainFixPass - This pass twiddles SSE opcodes to prevent domain
56 /// crossings.
57 FunctionPass *createSSEDomainFixPass();
58
59 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
60 /// to the specified MCE object.
61 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
62                                           JITCodeEmitter &JCE);
63
64 /// createX86EmitCodeToMemory - Returns a pass that converts a register
65 /// allocated function into raw machine code in a dynamically
66 /// allocated chunk of memory.
67 ///
68 FunctionPass *createEmitX86CodeToMemory();
69
70 /// createX86MaxStackAlignmentHeuristicPass - This function returns a pass
71 /// which determines whether the frame pointer register should be
72 /// reserved in case dynamic stack alignment is later required.
73 ///
74 FunctionPass *createX86MaxStackAlignmentHeuristicPass();
75
76 } // End llvm namespace
77
78 #endif