LLVM API Documentation
00001 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source 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 <iosfwd> 00019 00020 namespace llvm { 00021 00022 class TargetMachine; 00023 class FunctionPass; 00024 class IntrinsicLowering; 00025 00026 enum X86VectorEnum { 00027 NoSSE, SSE, SSE2, SSE3 00028 }; 00029 00030 extern X86VectorEnum X86Vector; 00031 00032 /// createX86SimpleInstructionSelector - This pass converts an LLVM function 00033 /// into a machine code representation in a very simple peep-hole fashion. The 00034 /// generated code sucks but the implementation is nice and simple. 00035 /// 00036 FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM); 00037 00038 /// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86 00039 /// specific peephole optimizations. 00040 /// 00041 FunctionPass *createX86SSAPeepholeOptimizerPass(); 00042 00043 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole 00044 /// optimizations. 00045 /// 00046 FunctionPass *createX86PeepholeOptimizerPass(); 00047 00048 /// createX86FloatingPointKiller - This function returns a pass which 00049 /// kills every floating point register at the end of each basic block 00050 /// because our FloatingPointStackifier cannot handle them. 00051 /// 00052 FunctionPass *createX86FloatingPointKillerPass(); 00053 00054 /// createX86FloatingPointStackifierPass - This function returns a pass which 00055 /// converts floating point register references and pseudo instructions into 00056 /// floating point stack references and physical instructions. 00057 /// 00058 FunctionPass *createX86FloatingPointStackifierPass(); 00059 00060 /// createX86CodePrinterPass - Returns a pass that prints the X86 00061 /// assembly code for a MachineFunction to the given output stream, 00062 /// using the given target machine description. This should work 00063 /// regardless of whether the function is in SSA form. 00064 /// 00065 FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm); 00066 00067 /// createX86EmitCodeToMemory - Returns a pass that converts a register 00068 /// allocated function into raw machine code in a dynamically 00069 /// allocated chunk of memory. 00070 /// 00071 FunctionPass *createEmitX86CodeToMemory(); 00072 00073 // Defines symbolic names for X86 registers. This defines a mapping from 00074 // register name to register number. 00075 // 00076 } // End llvm namespace 00077 00078 #include "X86GenRegisterNames.inc" 00079 00080 // Defines symbolic names for the X86 instructions. 00081 // 00082 #include "X86GenInstrNames.inc" 00083 00084 #endif