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 /// createX86ISelPattern - This pass converts an LLVM function into a
36 /// machine code representation using pattern matching and a machine
39 FunctionPass *createX86ISelPattern(TargetMachine &TM);
41 /// createX86ISelDag - This pass converts a legalized DAG into a
42 /// X86-specific DAG, ready for instruction scheduling.
44 FunctionPass *createX86ISelDag(TargetMachine &TM);
46 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
49 FunctionPass *createX86PeepholeOptimizerPass();
51 /// createX86FloatingPointStackifierPass - This function returns a pass which
52 /// converts floating point register references and pseudo instructions into
53 /// floating point stack references and physical instructions.
55 FunctionPass *createX86FloatingPointStackifierPass();
57 /// createX86CodePrinterPass - Returns a pass that prints the X86
58 /// assembly code for a MachineFunction to the given output stream,
59 /// using the given target machine description.
61 FunctionPass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm);
63 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
64 /// to the specified MCE object.
65 FunctionPass *createX86CodeEmitterPass(MachineCodeEmitter &MCE);
67 /// addX86ELFObjectWriterPass - Add passes to the FPM that output the generated
68 /// code as an ELF object file.
70 void addX86ELFObjectWriterPass(PassManager &FPM,
71 std::ostream &o, TargetMachine &tm);
73 /// createX86EmitCodeToMemory - Returns a pass that converts a register
74 /// allocated function into raw machine code in a dynamically
75 /// allocated chunk of memory.
77 FunctionPass *createEmitX86CodeToMemory();
79 } // End llvm namespace
81 // Defines symbolic names for X86 registers. This defines a mapping from
82 // register name to register number.
84 #include "X86GenRegisterNames.inc"
86 // Defines symbolic names for the X86 instructions.
88 #include "X86GenInstrNames.inc"