blob: ca78194d49dbffa8f8c616084d2ddf6e64f450a4 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the entry points for global functions defined in the x86
11// target library, as used by the LLVM JIT.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef TARGET_X86_H
16#define TARGET_X86_H
17
Bill Wendling5ed22ac2009-04-29 23:29:43 +000018#include "llvm/Target/TargetMachine.h"
19
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020namespace llvm {
21
22class X86TargetMachine;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000023class FunctionPass;
24class MachineCodeEmitter;
Daniel Dunbar2f379632009-08-27 08:12:55 +000025class MCCodeEmitter;
Bruno Cardoso Lopes1ea31ff2009-05-30 20:51:52 +000026class JITCodeEmitter;
Daniel Dunbar2f379632009-08-27 08:12:55 +000027class Target;
David Greene302008d2009-07-14 20:18:05 +000028class formatted_raw_ostream;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029
30/// createX86ISelDag - This pass converts a legalized DAG into a
31/// X86-specific DAG, ready for instruction scheduling.
32///
Bruno Cardoso Lopes8e2537b2009-06-01 19:57:37 +000033FunctionPass *createX86ISelDag(X86TargetMachine &TM,
34 CodeGenOpt::Level OptLevel);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000035
36/// createX86FloatingPointStackifierPass - This function returns a pass which
37/// converts floating point register references and pseudo instructions into
38/// floating point stack references and physical instructions.
39///
40FunctionPass *createX86FloatingPointStackifierPass();
41
Dan Gohmanfd6722c2008-11-12 22:55:05 +000042/// createX87FPRegKillInserterPass - This function returns a pass which
43/// inserts FP_REG_KILL instructions where needed.
44///
45FunctionPass *createX87FPRegKillInserterPass();
46
Dan Gohmanf17a25c2007-07-18 16:29:46 +000047/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
48/// to the specified MCE object.
Bruno Cardoso Lopes8e2537b2009-06-01 19:57:37 +000049FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
50 JITCodeEmitter &JCE);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000051
Daniel Dunbar2f379632009-08-27 08:12:55 +000052MCCodeEmitter *createX86MCCodeEmitter(const Target &, TargetMachine &TM);
53
Dan Gohmanf17a25c2007-07-18 16:29:46 +000054/// createX86EmitCodeToMemory - Returns a pass that converts a register
55/// allocated function into raw machine code in a dynamically
56/// allocated chunk of memory.
57///
58FunctionPass *createEmitX86CodeToMemory();
59
Daniel Dunbar0b0441e2009-07-18 23:03:22 +000060extern Target TheX86_32Target, TheX86_64Target;
61
Dan Gohmanf17a25c2007-07-18 16:29:46 +000062} // End llvm namespace
63
64// Defines symbolic names for X86 registers. This defines a mapping from
65// register name to register number.
66//
67#include "X86GenRegisterNames.inc"
68
69// Defines symbolic names for the X86 instructions.
70//
71#include "X86GenInstrNames.inc"
72
73#endif