blob: c7663be01864d812155353283134e1f4c255090e [file] [log] [blame]
Chris Lattnerd92fb002002-10-25 22:55:53 +00001//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
Misha Brukmanc88330a2005-04-21 23:38:14 +00002//
John Criswell29265fe2003-10-21 15:17:13 +00003// The LLVM Compiler Infrastructure
4//
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.
Misha Brukmanc88330a2005-04-21 23:38:14 +00007//
John Criswell29265fe2003-10-21 15:17:13 +00008//===----------------------------------------------------------------------===//
Chris Lattnerd92fb002002-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 Lattnerd92fb002002-10-25 22:55:53 +000013//===----------------------------------------------------------------------===//
14
15#ifndef TARGET_X86_H
16#define TARGET_X86_H
17
18#include <iosfwd>
Brian Gaeke960707c2003-11-11 22:41:34 +000019
20namespace llvm {
21
Evan Cheng2dd2c652006-03-13 23:20:37 +000022class X86TargetMachine;
Chris Lattner12e97302006-09-04 04:14:57 +000023class FunctionPassManager;
Brian Gaeke1a6f2b82003-08-13 18:15:29 +000024class FunctionPass;
Chris Lattnerd8312092005-07-11 05:17:48 +000025class MachineCodeEmitter;
Chris Lattnerd92fb002002-10-25 22:55:53 +000026
Chris Lattner76ac0682005-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 Cheng358b9ed2006-08-29 18:28:33 +000030FunctionPass *createX86ISelDag(X86TargetMachine &TM, bool Fast);
Chris Lattnerff9e21c2005-01-07 07:48:33 +000031
Chris Lattner61e11952003-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 Lattner49376432002-12-28 20:26:16 +000035///
Brian Gaeke1a6f2b82003-08-13 18:15:29 +000036FunctionPass *createX86FloatingPointStackifierPass();
Chris Lattner02a3d832002-10-29 22:37:54 +000037
Brian Gaekea92dce42003-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 Lattnerd8312092005-07-11 05:17:48 +000040/// using the given target machine description.
Chris Lattner02a3d832002-10-29 22:37:54 +000041///
Evan Cheng2dd2c652006-03-13 23:20:37 +000042FunctionPass *createX86CodePrinterPass(std::ostream &o, X86TargetMachine &tm);
Chris Lattnerd92fb002002-10-25 22:55:53 +000043
Chris Lattnerd8312092005-07-11 05:17:48 +000044/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
45/// to the specified MCE object.
Evan Chengf6acb342006-07-25 20:40:54 +000046FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM,
47 MachineCodeEmitter &MCE);
Chris Lattnerd8312092005-07-11 05:17:48 +000048
Brian Gaeke1a6f2b82003-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 Lattnerd92fb002002-10-25 22:55:53 +000052///
Brian Gaeke1a6f2b82003-08-13 18:15:29 +000053FunctionPass *createEmitX86CodeToMemory();
Chris Lattnerd92fb002002-10-25 22:55:53 +000054
Chris Lattnerff9e21c2005-01-07 07:48:33 +000055} // End llvm namespace
56
Chris Lattner8b316882003-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 Lattnerbb8bdc02003-08-03 21:57:05 +000062// Defines symbolic names for the X86 instructions.
63//
64#include "X86GenInstrNames.inc"
Chris Lattnerd92fb002002-10-25 22:55:53 +000065
66#endif