Reinstate "Nuke the old JIT."
[oota-llvm.git] / lib / Target / X86 / X86.h
1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the entry points for global functions defined in the x86
11 // target library, as used by the LLVM JIT.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_LIB_TARGET_X86_X86_H
16 #define LLVM_LIB_TARGET_X86_X86_H
17
18 #include "llvm/Support/CodeGen.h"
19
20 namespace llvm {
21
22 class FunctionPass;
23 class ImmutablePass;
24 class X86TargetMachine;
25
26 /// createX86AtomicExpandPass - This pass expands atomic operations that cannot
27 /// be handled natively in terms of a loop using cmpxchg.
28 FunctionPass *createX86AtomicExpandPass(const X86TargetMachine *TM);
29
30 /// createX86ISelDag - This pass converts a legalized DAG into a
31 /// X86-specific DAG, ready for instruction scheduling.
32 ///
33 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
34                                CodeGenOpt::Level OptLevel);
35
36 /// createX86GlobalBaseRegPass - This pass initializes a global base
37 /// register for PIC on x86-32.
38 FunctionPass* createX86GlobalBaseRegPass();
39
40 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
41 /// to local-dynamic TLS variables so that the TLS base address for the module
42 /// is only fetched once per execution path through the function.
43 FunctionPass *createCleanupLocalDynamicTLSPass();
44
45 /// createX86FloatingPointStackifierPass - This function returns a pass which
46 /// converts floating point register references and pseudo instructions into
47 /// floating point stack references and physical instructions.
48 ///
49 FunctionPass *createX86FloatingPointStackifierPass();
50
51 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
52 /// before each call to avoid transition penalty between functions encoded with
53 /// AVX and SSE.
54 FunctionPass *createX86IssueVZeroUpperPass();
55
56 /// createX86EmitCodeToMemory - Returns a pass that converts a register
57 /// allocated function into raw machine code in a dynamically
58 /// allocated chunk of memory.
59 ///
60 FunctionPass *createEmitX86CodeToMemory();
61
62 /// \brief Creates an X86-specific Target Transformation Info pass.
63 ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
64
65 /// createX86PadShortFunctions - Return a pass that pads short functions
66 /// with NOOPs. This will prevent a stall when returning on the Atom.
67 FunctionPass *createX86PadShortFunctions();
68 /// createX86FixupLEAs - Return a a pass that selectively replaces
69 /// certain instructions (like add, sub, inc, dec, some shifts,
70 /// and some multiplies) by equivalent LEA instructions, in order
71 /// to eliminate execution delays in some Atom processors.
72 FunctionPass *createX86FixupLEAs();
73
74 } // End llvm namespace
75
76 #endif