1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the entry points for global functions defined in the x86
11 // target library, as used by the LLVM JIT.
13 //===----------------------------------------------------------------------===//
18 #include "llvm/Support/CodeGen.h"
25 class X86TargetMachine;
27 /// createX86ISelDag - This pass converts a legalized DAG into a
28 /// X86-specific DAG, ready for instruction scheduling.
30 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
31 CodeGenOpt::Level OptLevel);
33 /// createX86GlobalBaseRegPass - This pass initializes a global base
34 /// register for PIC on x86-32.
35 FunctionPass* createX86GlobalBaseRegPass();
37 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
38 /// to local-dynamic TLS variables so that the TLS base address for the module
39 /// is only fetched once per execution path through the function.
40 FunctionPass *createCleanupLocalDynamicTLSPass();
42 /// createX86FloatingPointStackifierPass - This function returns a pass which
43 /// converts floating point register references and pseudo instructions into
44 /// floating point stack references and physical instructions.
46 FunctionPass *createX86FloatingPointStackifierPass();
48 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
49 /// before each call to avoid transition penalty between functions encoded with
51 FunctionPass *createX86IssueVZeroUpperPass();
53 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
54 /// to the specified MCE object.
55 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
58 /// createX86EmitCodeToMemory - Returns a pass that converts a register
59 /// allocated function into raw machine code in a dynamically
60 /// allocated chunk of memory.
62 FunctionPass *createEmitX86CodeToMemory();
64 /// \brief Creates an X86-specific Target Transformation Info pass.
65 ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
67 /// createX86PadShortFunctions - Return a pass that pads short functions
68 /// with NOOPs. This will prevent a stall when returning on the Atom.
69 FunctionPass *createX86PadShortFunctions();
70 /// createX86FixupLEAs - Return a a pass that selectively replaces
71 /// certain instructions (like add, sub, inc, dec, some shifts,
72 /// and some multiplies) by equivalent LEA instructions, in order
73 /// to eliminate execution delays in some Atom processors.
74 FunctionPass *createX86FixupLEAs();
76 } // End llvm namespace