1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the entry points for global functions defined in the x86
11 // target library, as used by the LLVM JIT.
13 //===----------------------------------------------------------------------===//
18 #include "MCTargetDesc/X86TargetDesc.h"
19 #include "llvm/Support/DataTypes.h"
20 #include "llvm/Target/TargetMachine.h"
29 class MachineCodeEmitter;
31 class TargetAsmBackend;
32 class X86TargetMachine;
33 class formatted_raw_ostream;
36 /// createX86ISelDag - This pass converts a legalized DAG into a
37 /// X86-specific DAG, ready for instruction scheduling.
39 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
40 CodeGenOpt::Level OptLevel);
42 /// createGlobalBaseRegPass - This pass initializes a global base
43 /// register for PIC on x86-32.
44 FunctionPass* createGlobalBaseRegPass();
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.
50 FunctionPass *createX86FloatingPointStackifierPass();
52 /// createSSEDomainFixPass - This pass twiddles SSE opcodes to prevent domain
54 FunctionPass *createSSEDomainFixPass();
56 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
57 /// to the specified MCE object.
58 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
61 MCCodeEmitter *createX86_32MCCodeEmitter(const Target &, TargetMachine &TM,
63 MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM,
66 TargetAsmBackend *createX86_32AsmBackend(const Target &, const std::string &);
67 TargetAsmBackend *createX86_64AsmBackend(const Target &, const std::string &);
69 /// createX86EmitCodeToMemory - Returns a pass that converts a register
70 /// allocated function into raw machine code in a dynamically
71 /// allocated chunk of memory.
73 FunctionPass *createEmitX86CodeToMemory();
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.
79 FunctionPass *createX86MaxStackAlignmentHeuristicPass();
82 /// createX86MachObjectWriter - Construct an X86 Mach-O object writer.
83 MCObjectWriter *createX86MachObjectWriter(raw_ostream &OS,
88 } // End llvm namespace