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 /// createX86AtomicExpandPass - This pass expands atomic operations that cannot
28 /// be handled natively in terms of a loop using cmpxchg.
29 FunctionPass *createX86AtomicExpandPass(const X86TargetMachine *TM);
31 /// createX86ISelDag - This pass converts a legalized DAG into a
32 /// X86-specific DAG, ready for instruction scheduling.
34 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
35 CodeGenOpt::Level OptLevel);
37 /// createX86GlobalBaseRegPass - This pass initializes a global base
38 /// register for PIC on x86-32.
39 FunctionPass* createX86GlobalBaseRegPass();
41 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
42 /// to local-dynamic TLS variables so that the TLS base address for the module
43 /// is only fetched once per execution path through the function.
44 FunctionPass *createCleanupLocalDynamicTLSPass();
46 /// createX86FloatingPointStackifierPass - This function returns a pass which
47 /// converts floating point register references and pseudo instructions into
48 /// floating point stack references and physical instructions.
50 FunctionPass *createX86FloatingPointStackifierPass();
52 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
53 /// before each call to avoid transition penalty between functions encoded with
55 FunctionPass *createX86IssueVZeroUpperPass();
57 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
58 /// to the specified MCE object.
59 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
62 /// createX86EmitCodeToMemory - Returns a pass that converts a register
63 /// allocated function into raw machine code in a dynamically
64 /// allocated chunk of memory.
66 FunctionPass *createEmitX86CodeToMemory();
68 /// \brief Creates an X86-specific Target Transformation Info pass.
69 ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
71 /// createX86PadShortFunctions - Return a pass that pads short functions
72 /// with NOOPs. This will prevent a stall when returning on the Atom.
73 FunctionPass *createX86PadShortFunctions();
74 /// createX86FixupLEAs - Return a a pass that selectively replaces
75 /// certain instructions (like add, sub, inc, dec, some shifts,
76 /// and some multiplies) by equivalent LEA instructions, in order
77 /// to eliminate execution delays in some Atom processors.
78 FunctionPass *createX86FixupLEAs();
80 } // End llvm namespace