Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 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 Wendling | 5ed22ac | 2009-04-29 23:29:43 +0000 | [diff] [blame] | 18 | #include "llvm/Target/TargetMachine.h" |
| 19 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 20 | namespace llvm { |
| 21 | |
| 22 | class X86TargetMachine; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 23 | class FunctionPass; |
| 24 | class MachineCodeEmitter; |
Bruno Cardoso Lopes | 1ea31ff | 2009-05-30 20:51:52 +0000 | [diff] [blame] | 25 | class JITCodeEmitter; |
Owen Anderson | 847b99b | 2008-08-21 00:14:44 +0000 | [diff] [blame] | 26 | class raw_ostream; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 27 | |
| 28 | /// createX86ISelDag - This pass converts a legalized DAG into a |
| 29 | /// X86-specific DAG, ready for instruction scheduling. |
| 30 | /// |
Bruno Cardoso Lopes | 8e2537b | 2009-06-01 19:57:37 +0000 | [diff] [blame] | 31 | FunctionPass *createX86ISelDag(X86TargetMachine &TM, |
| 32 | CodeGenOpt::Level OptLevel); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 33 | |
| 34 | /// createX86FloatingPointStackifierPass - This function returns a pass which |
| 35 | /// converts floating point register references and pseudo instructions into |
| 36 | /// floating point stack references and physical instructions. |
| 37 | /// |
| 38 | FunctionPass *createX86FloatingPointStackifierPass(); |
| 39 | |
Dan Gohman | fd6722c | 2008-11-12 22:55:05 +0000 | [diff] [blame] | 40 | /// createX87FPRegKillInserterPass - This function returns a pass which |
| 41 | /// inserts FP_REG_KILL instructions where needed. |
| 42 | /// |
| 43 | FunctionPass *createX87FPRegKillInserterPass(); |
| 44 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 45 | /// createX86CodePrinterPass - Returns a pass that prints the X86 |
| 46 | /// assembly code for a MachineFunction to the given output stream, |
| 47 | /// using the given target machine description. |
| 48 | /// |
Daniel Dunbar | b10d222 | 2009-07-01 01:48:54 +0000 | [diff] [blame^] | 49 | FunctionPass *createX86CodePrinterPass(raw_ostream &o, X86TargetMachine &tm, |
Bill Wendling | 5ed22ac | 2009-04-29 23:29:43 +0000 | [diff] [blame] | 50 | bool Verbose); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 51 | |
| 52 | /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code |
| 53 | /// to the specified MCE object. |
Bruno Cardoso Lopes | 1ea31ff | 2009-05-30 20:51:52 +0000 | [diff] [blame] | 54 | |
Bruno Cardoso Lopes | 8e2537b | 2009-06-01 19:57:37 +0000 | [diff] [blame] | 55 | FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM, |
| 56 | MachineCodeEmitter &MCE); |
| 57 | FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM, |
| 58 | JITCodeEmitter &JCE); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 59 | |
| 60 | /// createX86EmitCodeToMemory - Returns a pass that converts a register |
| 61 | /// allocated function into raw machine code in a dynamically |
| 62 | /// allocated chunk of memory. |
| 63 | /// |
| 64 | FunctionPass *createEmitX86CodeToMemory(); |
| 65 | |
Bruno Cardoso Lopes | 8e2537b | 2009-06-01 19:57:37 +0000 | [diff] [blame] | 66 | /// createX86MaxStackAlignmentCalculatorPass - This function returns a pass |
| 67 | /// which calculates maximal stack alignment required for function |
Anton Korobeynikov | 194ae6c | 2008-04-23 18:23:05 +0000 | [diff] [blame] | 68 | /// |
| 69 | FunctionPass *createX86MaxStackAlignmentCalculatorPass(); |
| 70 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 71 | } // End llvm namespace |
| 72 | |
| 73 | // Defines symbolic names for X86 registers. This defines a mapping from |
| 74 | // register name to register number. |
| 75 | // |
| 76 | #include "X86GenRegisterNames.inc" |
| 77 | |
| 78 | // Defines symbolic names for the X86 instructions. |
| 79 | // |
| 80 | #include "X86GenInstrNames.inc" |
| 81 | |
| 82 | #endif |