Merge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc
[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/X86TargetDesc.h"
19 #include "llvm/Support/DataTypes.h"
20 #include "llvm/Target/TargetMachine.h"
21
22 namespace llvm {
23
24 class FunctionPass;
25 class JITCodeEmitter;
26 class MCCodeEmitter;
27 class MCContext;
28 class MCObjectWriter;
29 class MachineCodeEmitter;
30 class Target;
31 class TargetAsmBackend;
32 class X86TargetMachine;
33 class formatted_raw_ostream;
34 class raw_ostream;
35
36 /// createX86ISelDag - This pass converts a legalized DAG into a 
37 /// X86-specific DAG, ready for instruction scheduling.
38 ///
39 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
40                                CodeGenOpt::Level OptLevel);
41
42 /// createGlobalBaseRegPass - This pass initializes a global base
43 /// register for PIC on x86-32.
44 FunctionPass* createGlobalBaseRegPass();
45
46 /// createX86FloatingPointStackifierPass - This function returns a pass which
47 /// converts floating point register references and pseudo instructions into
48 /// floating point stack references and physical instructions.
49 ///
50 FunctionPass *createX86FloatingPointStackifierPass();
51
52 /// createSSEDomainFixPass - This pass twiddles SSE opcodes to prevent domain
53 /// crossings.
54 FunctionPass *createSSEDomainFixPass();
55
56 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
57 /// to the specified MCE object.
58 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
59                                           JITCodeEmitter &JCE);
60
61 MCCodeEmitter *createX86_32MCCodeEmitter(const Target &, TargetMachine &TM,
62                                          MCContext &Ctx);
63 MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM,
64                                          MCContext &Ctx);
65
66 TargetAsmBackend *createX86_32AsmBackend(const Target &, const std::string &);
67 TargetAsmBackend *createX86_64AsmBackend(const Target &, const std::string &);
68
69 /// createX86EmitCodeToMemory - Returns a pass that converts a register
70 /// allocated function into raw machine code in a dynamically
71 /// allocated chunk of memory.
72 ///
73 FunctionPass *createEmitX86CodeToMemory();
74
75 /// createX86MaxStackAlignmentHeuristicPass - This function returns a pass
76 /// which determines whether the frame pointer register should be
77 /// reserved in case dynamic stack alignment is later required.
78 ///
79 FunctionPass *createX86MaxStackAlignmentHeuristicPass();
80
81
82 /// createX86MachObjectWriter - Construct an X86 Mach-O object writer.
83 MCObjectWriter *createX86MachObjectWriter(raw_ostream &OS,
84                                           bool Is64Bit,
85                                           uint32_t CPUType,
86                                           uint32_t CPUSubtype);
87
88 } // End llvm namespace
89
90 #endif