Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 1 | //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===// |
Misha Brukman | 0e0a7a45 | 2005-04-21 23:38:14 +0000 | [diff] [blame] | 2 | // |
John Criswell | 856ba76 | 2003-10-21 15:17:13 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 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. |
Misha Brukman | 0e0a7a45 | 2005-04-21 23:38:14 +0000 | [diff] [blame] | 7 | // |
John Criswell | 856ba76 | 2003-10-21 15:17:13 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 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 | // |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef TARGET_X86_H |
| 16 | #define TARGET_X86_H |
| 17 | |
Evan Cheng | 8c3fee5 | 2011-07-25 18:43:53 +0000 | [diff] [blame] | 18 | #include "MCTargetDesc/X86BaseInfo.h" |
Evan Cheng | ed5e355 | 2011-07-06 22:01:53 +0000 | [diff] [blame] | 19 | #include "MCTargetDesc/X86MCTargetDesc.h" |
Daniel Dunbar | 67e0c21 | 2010-12-20 15:45:51 +0000 | [diff] [blame] | 20 | #include "llvm/Support/DataTypes.h" |
Bill Wendling | 98a366d | 2009-04-29 23:29:43 +0000 | [diff] [blame] | 21 | #include "llvm/Target/TargetMachine.h" |
| 22 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 23 | namespace llvm { |
| 24 | |
Brian Gaeke | 9826bdb | 2003-08-13 18:15:29 +0000 | [diff] [blame] | 25 | class FunctionPass; |
Daniel Dunbar | 12783d1 | 2010-02-21 21:54:14 +0000 | [diff] [blame] | 26 | class JITCodeEmitter; |
Evan Cheng | 59ee62d | 2011-07-11 03:57:24 +0000 | [diff] [blame] | 27 | class MachineCodeEmitter; |
Daniel Dunbar | 7168a7d | 2009-08-27 08:12:55 +0000 | [diff] [blame] | 28 | class Target; |
Daniel Dunbar | 12783d1 | 2010-02-21 21:54:14 +0000 | [diff] [blame] | 29 | class X86TargetMachine; |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 30 | |
Chris Lattner | dbdbf0c | 2005-11-15 00:40:23 +0000 | [diff] [blame] | 31 | /// createX86ISelDag - This pass converts a legalized DAG into a |
| 32 | /// X86-specific DAG, ready for instruction scheduling. |
| 33 | /// |
Bruno Cardoso Lopes | 434dd4f | 2009-06-01 19:57:37 +0000 | [diff] [blame] | 34 | FunctionPass *createX86ISelDag(X86TargetMachine &TM, |
| 35 | CodeGenOpt::Level OptLevel); |
Chris Lattner | 95cdb36 | 2005-01-07 07:48:33 +0000 | [diff] [blame] | 36 | |
Dan Gohman | 84023e0 | 2010-07-10 09:00:22 +0000 | [diff] [blame] | 37 | /// createGlobalBaseRegPass - This pass initializes a global base |
| 38 | /// register for PIC on x86-32. |
| 39 | FunctionPass* createGlobalBaseRegPass(); |
| 40 | |
Chris Lattner | 31ad5dd | 2003-01-13 00:45:29 +0000 | [diff] [blame] | 41 | /// createX86FloatingPointStackifierPass - This function returns a pass which |
| 42 | /// converts floating point register references and pseudo instructions into |
| 43 | /// floating point stack references and physical instructions. |
Chris Lattner | f2ab412 | 2002-12-28 20:26:16 +0000 | [diff] [blame] | 44 | /// |
Brian Gaeke | 9826bdb | 2003-08-13 18:15:29 +0000 | [diff] [blame] | 45 | FunctionPass *createX86FloatingPointStackifierPass(); |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 46 | |
Jakob Stoklund Olesen | 352aa50 | 2010-03-25 17:25:00 +0000 | [diff] [blame] | 47 | /// createSSEDomainFixPass - This pass twiddles SSE opcodes to prevent domain |
| 48 | /// crossings. |
| 49 | FunctionPass *createSSEDomainFixPass(); |
| 50 | |
Chris Lattner | 81b6ed7 | 2005-07-11 05:17:48 +0000 | [diff] [blame] | 51 | /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code |
| 52 | /// to the specified MCE object. |
Bruno Cardoso Lopes | 434dd4f | 2009-06-01 19:57:37 +0000 | [diff] [blame] | 53 | FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM, |
| 54 | JITCodeEmitter &JCE); |
Chris Lattner | 81b6ed7 | 2005-07-11 05:17:48 +0000 | [diff] [blame] | 55 | |
Brian Gaeke | 9826bdb | 2003-08-13 18:15:29 +0000 | [diff] [blame] | 56 | /// createX86EmitCodeToMemory - Returns a pass that converts a register |
| 57 | /// allocated function into raw machine code in a dynamically |
| 58 | /// allocated chunk of memory. |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 59 | /// |
Brian Gaeke | 9826bdb | 2003-08-13 18:15:29 +0000 | [diff] [blame] | 60 | FunctionPass *createEmitX86CodeToMemory(); |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 61 | |
Jim Grosbach | fa85eb6 | 2010-04-06 20:26:37 +0000 | [diff] [blame] | 62 | /// createX86MaxStackAlignmentHeuristicPass - This function returns a pass |
| 63 | /// which determines whether the frame pointer register should be |
| 64 | /// reserved in case dynamic stack alignment is later required. |
| 65 | /// |
| 66 | FunctionPass *createX86MaxStackAlignmentHeuristicPass(); |
| 67 | |
Chris Lattner | 95cdb36 | 2005-01-07 07:48:33 +0000 | [diff] [blame] | 68 | } // End llvm namespace |
| 69 | |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 70 | #endif |