2002-10-26 06:55:53 +08:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
2005-04-22 07:38:14 +08:00
|
|
|
//
|
2003-10-21 23:17:13 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-22 07:38:14 +08:00
|
|
|
//
|
2003-10-21 23:17:13 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-26 06:55:53 +08:00
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the x86
|
|
|
|
// target library, as used by the LLVM JIT.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86_H
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2014-03-19 14:53:25 +08:00
|
|
|
#include "llvm/Support/CodeGen.h"
|
2009-04-30 07:29:43 +08:00
|
|
|
|
2003-11-12 06:41:34 +08:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-14 02:15:29 +08:00
|
|
|
class FunctionPass;
|
2014-03-19 14:53:25 +08:00
|
|
|
class ImmutablePass;
|
2010-02-22 05:54:14 +08:00
|
|
|
class X86TargetMachine;
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2012-08-02 02:39:17 +08:00
|
|
|
/// createX86ISelDag - This pass converts a legalized DAG into a
|
2005-11-15 08:40:23 +08:00
|
|
|
/// X86-specific DAG, ready for instruction scheduling.
|
|
|
|
///
|
2009-06-02 03:57:37 +08:00
|
|
|
FunctionPass *createX86ISelDag(X86TargetMachine &TM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
2005-01-07 15:48:33 +08:00
|
|
|
|
2014-05-22 09:45:57 +08:00
|
|
|
/// createX86GlobalBaseRegPass - This pass initializes a global base
|
2010-07-10 17:00:22 +08:00
|
|
|
/// register for PIC on x86-32.
|
2014-05-22 09:45:57 +08:00
|
|
|
FunctionPass* createX86GlobalBaseRegPass();
|
2010-07-10 17:00:22 +08:00
|
|
|
|
2012-06-02 00:27:21 +08: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();
|
|
|
|
|
2003-01-13 08:45:29 +08:00
|
|
|
/// createX86FloatingPointStackifierPass - This function returns a pass which
|
|
|
|
/// converts floating point register references and pseudo instructions into
|
|
|
|
/// floating point stack references and physical instructions.
|
2002-12-29 04:26:16 +08:00
|
|
|
///
|
2003-08-14 02:15:29 +08:00
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
2002-10-30 06:37:54 +08:00
|
|
|
|
2011-08-23 09:14:17 +08:00
|
|
|
/// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
|
|
|
|
/// before each call to avoid transition penalty between functions encoded with
|
|
|
|
/// AVX and SSE.
|
|
|
|
FunctionPass *createX86IssueVZeroUpperPass();
|
|
|
|
|
2003-08-14 02:15:29 +08:00
|
|
|
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
|
|
|
/// allocated function into raw machine code in a dynamically
|
|
|
|
/// allocated chunk of memory.
|
2002-10-26 06:55:53 +08:00
|
|
|
///
|
2003-08-14 02:15:29 +08:00
|
|
|
FunctionPass *createEmitX86CodeToMemory();
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2013-01-09 02:27:24 +08:00
|
|
|
/// createX86PadShortFunctions - Return a pass that pads short functions
|
|
|
|
/// with NOOPs. This will prevent a stall when returning on the Atom.
|
|
|
|
FunctionPass *createX86PadShortFunctions();
|
2013-04-26 04:29:37 +08: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();
|
2013-01-09 02:27:24 +08:00
|
|
|
|
2015-02-02 00:56:04 +08:00
|
|
|
/// createX86CallFrameOptimization - Return a pass that optimizes
|
|
|
|
/// the code-size of x86 call sequences. This is done by replacing
|
|
|
|
/// esp-relative movs with pushes.
|
|
|
|
FunctionPass *createX86CallFrameOptimization();
|
|
|
|
|
2015-05-06 01:44:16 +08:00
|
|
|
/// createX86WinEHStatePass - Return an IR pass that inserts EH registration
|
|
|
|
/// stack objects and explicit EH state updates. This pass must run after EH
|
|
|
|
/// preparation, which does Windows-specific but architecture-neutral
|
|
|
|
/// preparation.
|
|
|
|
FunctionPass *createX86WinEHStatePass();
|
|
|
|
|
2005-01-07 15:48:33 +08:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2002-10-26 06:55:53 +08:00
|
|
|
#endif
|