LLVM API Documentation
00001 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the entry points for global functions defined in the x86 00011 // target library, as used by the LLVM JIT. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef TARGET_X86_H 00016 #define TARGET_X86_H 00017 00018 #include "llvm/Target/TargetMachine.h" 00019 00020 namespace llvm { 00021 00022 class X86TargetMachine; 00023 class FunctionPass; 00024 class MachineCodeEmitter; 00025 class JITCodeEmitter; 00026 class formatted_raw_ostream; 00027 00028 /// createX86ISelDag - This pass converts a legalized DAG into a 00029 /// X86-specific DAG, ready for instruction scheduling. 00030 /// 00031 FunctionPass *createX86ISelDag(X86TargetMachine &TM, 00032 CodeGenOpt::Level OptLevel); 00033 00034 /// createX86FloatingPointStackifierPass - This function returns a pass which 00035 /// converts floating point register references and pseudo instructions into 00036 /// floating point stack references and physical instructions. 00037 /// 00038 FunctionPass *createX86FloatingPointStackifierPass(); 00039 00040 /// createX87FPRegKillInserterPass - This function returns a pass which 00041 /// inserts FP_REG_KILL instructions where needed. 00042 /// 00043 FunctionPass *createX87FPRegKillInserterPass(); 00044 00045 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code 00046 /// to the specified MCE object. 00047 00048 FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM, 00049 MachineCodeEmitter &MCE); 00050 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM, 00051 JITCodeEmitter &JCE); 00052 FunctionPass *createX86ObjectCodeEmitterPass(X86TargetMachine &TM, 00053 ObjectCodeEmitter &OCE); 00054 00055 /// createX86EmitCodeToMemory - Returns a pass that converts a register 00056 /// allocated function into raw machine code in a dynamically 00057 /// allocated chunk of memory. 00058 /// 00059 FunctionPass *createEmitX86CodeToMemory(); 00060 00061 /// createX86MaxStackAlignmentCalculatorPass - This function returns a pass 00062 /// which calculates maximal stack alignment required for function 00063 /// 00064 FunctionPass *createX86MaxStackAlignmentCalculatorPass(); 00065 00066 extern Target TheX86_32Target, TheX86_64Target; 00067 00068 } // End llvm namespace 00069 00070 // Defines symbolic names for X86 registers. This defines a mapping from 00071 // register name to register number. 00072 // 00073 #include "X86GenRegisterNames.inc" 00074 00075 // Defines symbolic names for the X86 instructions. 00076 // 00077 #include "X86GenInstrNames.inc" 00078 00079 #endif