blob: c2a1dfde6157779cfd1cf18947e3ec5332906df7 [file] [log] [blame]
Chris Lattner72614082002-10-25 22:55:53 +00001//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
Misha Brukman0e0a7a452005-04-21 23:38:14 +00002//
John Criswell856ba762003-10-21 15:17:13 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman0e0a7a452005-04-21 23:38:14 +00007//
John Criswell856ba762003-10-21 15:17:13 +00008//===----------------------------------------------------------------------===//
Chris Lattner72614082002-10-25 22:55:53 +00009//
10// This file contains the entry points for global functions defined in the x86
11// target library, as used by the LLVM JIT.
12//
Chris Lattner72614082002-10-25 22:55:53 +000013//===----------------------------------------------------------------------===//
14
15#ifndef TARGET_X86_H
16#define TARGET_X86_H
17
18#include <iosfwd>
Brian Gaeked0fde302003-11-11 22:41:34 +000019
20namespace llvm {
21
Evan Chengc4c62572006-03-13 23:20:37 +000022class X86TargetMachine;
Chris Lattner1911fd42006-09-04 04:14:57 +000023class FunctionPassManager;
Brian Gaeke9826bdb2003-08-13 18:15:29 +000024class FunctionPass;
Chris Lattner81b6ed72005-07-11 05:17:48 +000025class MachineCodeEmitter;
Chris Lattner72614082002-10-25 22:55:53 +000026
Chris Lattnerdbdbf0c2005-11-15 00:40:23 +000027/// createX86ISelDag - This pass converts a legalized DAG into a
28/// X86-specific DAG, ready for instruction scheduling.
29///
Evan Chenge50794a2006-08-29 18:28:33 +000030FunctionPass *createX86ISelDag(X86TargetMachine &TM, bool Fast);
Chris Lattner95cdb362005-01-07 07:48:33 +000031
Chris Lattner31ad5dd2003-01-13 00:45:29 +000032/// createX86FloatingPointStackifierPass - This function returns a pass which
33/// converts floating point register references and pseudo instructions into
34/// floating point stack references and physical instructions.
Chris Lattnerf2ab4122002-12-28 20:26:16 +000035///
Brian Gaeke9826bdb2003-08-13 18:15:29 +000036FunctionPass *createX86FloatingPointStackifierPass();
Chris Lattnerb4f68ed2002-10-29 22:37:54 +000037
Brian Gaekede420ae2003-07-23 20:25:08 +000038/// createX86CodePrinterPass - Returns a pass that prints the X86
39/// assembly code for a MachineFunction to the given output stream,
Chris Lattner81b6ed72005-07-11 05:17:48 +000040/// using the given target machine description.
Chris Lattnerb4f68ed2002-10-29 22:37:54 +000041///
Evan Chengc4c62572006-03-13 23:20:37 +000042FunctionPass *createX86CodePrinterPass(std::ostream &o, X86TargetMachine &tm);
Chris Lattner72614082002-10-25 22:55:53 +000043
Chris Lattner81b6ed72005-07-11 05:17:48 +000044/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
45/// to the specified MCE object.
Evan Cheng55fc2802006-07-25 20:40:54 +000046FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM,
47 MachineCodeEmitter &MCE);
Chris Lattner81b6ed72005-07-11 05:17:48 +000048
Brian Gaeke9826bdb2003-08-13 18:15:29 +000049/// createX86EmitCodeToMemory - Returns a pass that converts a register
50/// allocated function into raw machine code in a dynamically
51/// allocated chunk of memory.
Chris Lattner72614082002-10-25 22:55:53 +000052///
Brian Gaeke9826bdb2003-08-13 18:15:29 +000053FunctionPass *createEmitX86CodeToMemory();
Chris Lattner72614082002-10-25 22:55:53 +000054
Chris Lattner95cdb362005-01-07 07:48:33 +000055} // End llvm namespace
56
Chris Lattner83200352003-08-03 15:48:55 +000057// Defines symbolic names for X86 registers. This defines a mapping from
58// register name to register number.
59//
60#include "X86GenRegisterNames.inc"
61
Chris Lattner8d44ba82003-08-03 21:57:05 +000062// Defines symbolic names for the X86 instructions.
63//
64#include "X86GenInstrNames.inc"
Chris Lattner72614082002-10-25 22:55:53 +000065
66#endif