Prune includes in X86 target.
[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 TARGET_X86_H
16 #define TARGET_X86_H
17
18 #include "llvm/Support/CodeGen.h"
19
20 namespace llvm {
21
22 class FunctionPass;
23 class ImmutablePass;
24 class JITCodeEmitter;
25 class X86TargetMachine;
26
27 /// createX86ISelDag - This pass converts a legalized DAG into a
28 /// X86-specific DAG, ready for instruction scheduling.
29 ///
30 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
31                                CodeGenOpt::Level OptLevel);
32
33 /// createGlobalBaseRegPass - This pass initializes a global base
34 /// register for PIC on x86-32.
35 FunctionPass* createGlobalBaseRegPass();
36
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();
41
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.
45 ///
46 FunctionPass *createX86FloatingPointStackifierPass();
47
48 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
49 /// before each call to avoid transition penalty between functions encoded with
50 /// AVX and SSE.
51 FunctionPass *createX86IssueVZeroUpperPass();
52
53 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
54 /// to the specified MCE object.
55 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
56                                           JITCodeEmitter &JCE);
57
58 /// createX86EmitCodeToMemory - Returns a pass that converts a register
59 /// allocated function into raw machine code in a dynamically
60 /// allocated chunk of memory.
61 ///
62 FunctionPass *createEmitX86CodeToMemory();
63
64 /// \brief Creates an X86-specific Target Transformation Info pass.
65 ImmutablePass *createX86TargetTransformInfoPass(const X86TargetMachine *TM);
66
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();
75
76 } // End llvm namespace
77
78 #endif