1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
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.
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 //===----------------------------------------------------------------------===//
25 class IntrinsicLowering;
26 class MachineCodeEmitter;
29 NoSSE, SSE, SSE2, SSE3
32 extern X86VectorEnum X86Vector;
33 extern bool X86ScalarSSE;
35 /// createX86PatternInstructionSelector - This pass converts an LLVM function
36 /// into a machine code representation in a more aggressive way.
38 FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM);
40 /// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86
41 /// specific peephole optimizations.
43 FunctionPass *createX86SSAPeepholeOptimizerPass();
45 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
48 FunctionPass *createX86PeepholeOptimizerPass();
50 /// createX86FloatingPointStackifierPass - This function returns a pass which
51 /// converts floating point register references and pseudo instructions into
52 /// floating point stack references and physical instructions.
54 FunctionPass *createX86FloatingPointStackifierPass();
56 /// createX86CodePrinterPass - Returns a pass that prints the X86
57 /// assembly code for a MachineFunction to the given output stream,
58 /// using the given target machine description.
60 FunctionPass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm);
62 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
63 /// to the specified MCE object.
64 FunctionPass *createX86CodeEmitterPass(MachineCodeEmitter &MCE);
66 /// addX86ELFObjectWriterPass - Add passes to the FPM that output the generated
67 /// code as an ELF object file.
69 void addX86ELFObjectWriterPass(PassManager &FPM,
70 std::ostream &o, TargetMachine &tm);
72 /// createX86EmitCodeToMemory - Returns a pass that converts a register
73 /// allocated function into raw machine code in a dynamically
74 /// allocated chunk of memory.
76 FunctionPass *createEmitX86CodeToMemory();
78 } // End llvm namespace
80 // Defines symbolic names for X86 registers. This defines a mapping from
81 // register name to register number.
83 #include "X86GenRegisterNames.inc"
85 // Defines symbolic names for the X86 instructions.
87 #include "X86GenInstrNames.inc"