2002-10-26 00:55:53 +02:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
2005-04-22 01:38:14 +02:00
|
|
|
//
|
2003-10-21 17:17:13 +02:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 21:36:04 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-22 01:38:14 +02:00
|
|
|
//
|
2003-10-21 17:17:13 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-26 00:55:53 +02:00
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the x86
|
|
|
|
// target library, as used by the LLVM JIT.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 18:26:38 +02:00
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86_H
|
2002-10-26 00:55:53 +02:00
|
|
|
|
2014-03-19 07:53:25 +01:00
|
|
|
#include "llvm/Support/CodeGen.h"
|
2009-04-30 01:29:43 +02:00
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-13 20:15:29 +02:00
|
|
|
class FunctionPass;
|
2014-03-19 07:53:25 +01:00
|
|
|
class ImmutablePass;
|
2010-02-21 22:54:14 +01:00
|
|
|
class X86TargetMachine;
|
2002-10-26 00:55:53 +02:00
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// This pass converts a legalized DAG into a X86-specific DAG, ready for
|
|
|
|
/// instruction scheduling.
|
2009-06-01 21:57:37 +02:00
|
|
|
FunctionPass *createX86ISelDag(X86TargetMachine &TM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
2005-01-07 08:48:33 +01:00
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// This pass initializes a global base register for PIC on x86-32.
|
2016-01-12 14:34:11 +01:00
|
|
|
FunctionPass *createX86GlobalBaseRegPass();
|
2010-07-10 11:00:22 +02:00
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// 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.
|
2012-06-01 18:27:21 +02:00
|
|
|
FunctionPass *createCleanupLocalDynamicTLSPass();
|
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// This function returns a pass which converts floating-point register
|
|
|
|
/// references and pseudo instructions into floating-point stack references and
|
|
|
|
/// physical instructions.
|
2003-08-13 20:15:29 +02:00
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
2002-10-29 23:37:54 +01:00
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// This pass inserts AVX vzeroupper instructions before each call to avoid
|
|
|
|
/// transition penalty between functions encoded with AVX and SSE.
|
2011-08-23 03:14:17 +02:00
|
|
|
FunctionPass *createX86IssueVZeroUpperPass();
|
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// Return a pass that pads short functions with NOOPs.
|
|
|
|
/// This will prevent a stall when returning on the Atom.
|
2013-01-08 19:27:24 +01:00
|
|
|
FunctionPass *createX86PadShortFunctions();
|
2015-12-07 20:31:34 +01:00
|
|
|
|
2016-01-12 14:34:11 +01:00
|
|
|
/// Return a pass that selectively replaces certain instructions (like add,
|
2015-12-07 20:31:34 +01:00
|
|
|
/// sub, inc, dec, some shifts, and some multiplies) by equivalent LEA
|
|
|
|
/// instructions, in order to eliminate execution delays in some processors.
|
2013-04-25 22:29:37 +02:00
|
|
|
FunctionPass *createX86FixupLEAs();
|
2013-01-08 19:27:24 +01:00
|
|
|
|
2016-01-13 12:30:44 +01:00
|
|
|
/// Return a pass that removes redundant LEA instructions and redundant address
|
|
|
|
/// recalculations.
|
2015-12-04 11:53:15 +01:00
|
|
|
FunctionPass *createX86OptimizeLEAs();
|
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// Return a pass that optimizes the code-size of x86 call sequences. This is
|
|
|
|
/// done by replacing esp-relative movs with pushes.
|
2015-02-01 17:56:04 +01:00
|
|
|
FunctionPass *createX86CallFrameOptimization();
|
|
|
|
|
2015-12-07 20:31:34 +01:00
|
|
|
/// 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.
|
2015-05-05 19:44:16 +02:00
|
|
|
FunctionPass *createX86WinEHStatePass();
|
|
|
|
|
2015-05-22 20:10:47 +02:00
|
|
|
/// Return a Machine IR pass that expands X86-specific pseudo
|
|
|
|
/// instructions into a sequence of actual instructions. This pass
|
|
|
|
/// must run after prologue/epilogue insertion and before lowering
|
|
|
|
/// the MachineInstr to MC.
|
|
|
|
FunctionPass *createX86ExpandPseudoPass();
|
2015-06-23 11:49:53 +02:00
|
|
|
} // End llvm namespace
|
2005-01-07 08:48:33 +01:00
|
|
|
|
2002-10-26 00:55:53 +02:00
|
|
|
#endif
|