2009-06-02 17:52:33 +00:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the x86
|
|
|
|
// target library, as used by the LLVM JIT.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef TARGET_X86_H
|
|
|
|
#define TARGET_X86_H
|
|
|
|
|
2011-10-20 21:10:27 +00:00
|
|
|
#include "MCTargetDesc/X86BaseInfo.h"
|
2011-07-17 15:36:56 +00:00
|
|
|
#include "MCTargetDesc/X86MCTargetDesc.h"
|
2011-02-20 12:57:14 +00:00
|
|
|
#include "llvm/Support/DataTypes.h"
|
2009-06-02 17:52:33 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class FunctionPass;
|
2010-03-03 17:27:15 +00:00
|
|
|
class JITCodeEmitter;
|
|
|
|
class X86TargetMachine;
|
2009-06-02 17:52:33 +00:00
|
|
|
|
2012-08-15 19:34:23 +00:00
|
|
|
/// createX86ISelDag - This pass converts a legalized DAG into a
|
2009-06-02 17:52:33 +00:00
|
|
|
/// X86-specific DAG, ready for instruction scheduling.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86ISelDag(X86TargetMachine &TM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
|
|
|
|
2010-07-13 17:19:57 +00:00
|
|
|
/// createGlobalBaseRegPass - This pass initializes a global base
|
|
|
|
/// register for PIC on x86-32.
|
|
|
|
FunctionPass* createGlobalBaseRegPass();
|
|
|
|
|
2012-08-15 19:34:23 +00:00
|
|
|
/// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
|
|
|
|
/// to local-dynamic TLS variables so that the TLS base address for the module
|
|
|
|
/// is only fetched once per execution path through the function.
|
|
|
|
FunctionPass *createCleanupLocalDynamicTLSPass();
|
|
|
|
|
2009-06-02 17:52:33 +00:00
|
|
|
/// createX86FloatingPointStackifierPass - This function returns a pass which
|
|
|
|
/// converts floating point register references and pseudo instructions into
|
|
|
|
/// floating point stack references and physical instructions.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
|
|
|
|
2011-10-20 21:10:27 +00:00
|
|
|
/// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
|
|
|
|
/// before each call to avoid transition penalty between functions encoded with
|
|
|
|
/// AVX and SSE.
|
|
|
|
FunctionPass *createX86IssueVZeroUpperPass();
|
2010-04-02 08:54:30 +00:00
|
|
|
|
2009-06-02 17:52:33 +00:00
|
|
|
/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
|
|
|
|
/// to the specified MCE object.
|
|
|
|
FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
|
|
|
|
JITCodeEmitter &JCE);
|
2009-10-14 17:57:32 +00:00
|
|
|
|
2009-06-02 17:52:33 +00:00
|
|
|
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
|
|
|
/// allocated function into raw machine code in a dynamically
|
|
|
|
/// allocated chunk of memory.
|
|
|
|
///
|
|
|
|
FunctionPass *createEmitX86CodeToMemory();
|
|
|
|
|
2013-04-08 18:41:23 +00:00
|
|
|
/// \brief Creates an X86-specific Target Transformation Info pass.
|
|
|
|
ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
|
|
|
|
|
|
|
|
/// createX86PadShortFunctions - Return a pass that pads short functions
|
|
|
|
/// with NOOPs. This will prevent a stall when returning on the Atom.
|
|
|
|
FunctionPass *createX86PadShortFunctions();
|
2013-06-10 20:36:52 +00:00
|
|
|
/// createX86FixupLEAs - Return a a pass that selectively replaces
|
|
|
|
/// certain instructions (like add, sub, inc, dec, some shifts,
|
|
|
|
/// and some multiplies) by equivalent LEA instructions, in order
|
|
|
|
/// to eliminate execution delays in some Atom processors.
|
|
|
|
FunctionPass *createX86FixupLEAs();
|
2010-05-04 16:11:02 +00:00
|
|
|
|
2009-06-02 17:52:33 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|