LLVM API Documentation

X86.h
Go to the documentation of this file.
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 LLVM_LIB_TARGET_X86_X86_H
00016 #define LLVM_LIB_TARGET_X86_X86_H
00017 
00018 #include "llvm/Support/CodeGen.h"
00019 
00020 namespace llvm {
00021 
00022 class FunctionPass;
00023 class ImmutablePass;
00024 class X86TargetMachine;
00025 
00026 /// createX86ISelDag - This pass converts a legalized DAG into a
00027 /// X86-specific DAG, ready for instruction scheduling.
00028 ///
00029 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
00030                                CodeGenOpt::Level OptLevel);
00031 
00032 /// createX86GlobalBaseRegPass - This pass initializes a global base
00033 /// register for PIC on x86-32.
00034 FunctionPass* createX86GlobalBaseRegPass();
00035 
00036 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
00037 /// to local-dynamic TLS variables so that the TLS base address for the module
00038 /// is only fetched once per execution path through the function.
00039 FunctionPass *createCleanupLocalDynamicTLSPass();
00040 
00041 /// createX86FloatingPointStackifierPass - This function returns a pass which
00042 /// converts floating point register references and pseudo instructions into
00043 /// floating point stack references and physical instructions.
00044 ///
00045 FunctionPass *createX86FloatingPointStackifierPass();
00046 
00047 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
00048 /// before each call to avoid transition penalty between functions encoded with
00049 /// AVX and SSE.
00050 FunctionPass *createX86IssueVZeroUpperPass();
00051 
00052 /// createX86EmitCodeToMemory - Returns a pass that converts a register
00053 /// allocated function into raw machine code in a dynamically
00054 /// allocated chunk of memory.
00055 ///
00056 FunctionPass *createEmitX86CodeToMemory();
00057 
00058 /// \brief Creates an X86-specific Target Transformation Info pass.
00059 ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
00060 
00061 /// createX86PadShortFunctions - Return a pass that pads short functions
00062 /// with NOOPs. This will prevent a stall when returning on the Atom.
00063 FunctionPass *createX86PadShortFunctions();
00064 /// createX86FixupLEAs - Return a a pass that selectively replaces
00065 /// certain instructions (like add, sub, inc, dec, some shifts,
00066 /// and some multiplies) by equivalent LEA instructions, in order
00067 /// to eliminate execution delays in some Atom processors.
00068 FunctionPass *createX86FixupLEAs();
00069 
00070 } // End llvm namespace
00071 
00072 #endif