LLVM  3.7.0
X86.h
Go to the documentation of this file.
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 /// createX86ISelDag - This pass converts a legalized DAG into a
27 /// X86-specific DAG, ready for instruction scheduling.
28 ///
29 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
30  CodeGenOpt::Level OptLevel);
31 
32 /// createX86GlobalBaseRegPass - This pass initializes a global base
33 /// register for PIC on x86-32.
34 FunctionPass* createX86GlobalBaseRegPass();
35 
36 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
37 /// to local-dynamic TLS variables so that the TLS base address for the module
38 /// is only fetched once per execution path through the function.
39 FunctionPass *createCleanupLocalDynamicTLSPass();
40 
41 /// createX86FloatingPointStackifierPass - This function returns a pass which
42 /// converts floating point register references and pseudo instructions into
43 /// floating point stack references and physical instructions.
44 ///
46 
47 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
48 /// before each call to avoid transition penalty between functions encoded with
49 /// AVX and SSE.
50 FunctionPass *createX86IssueVZeroUpperPass();
51 
52 /// createX86EmitCodeToMemory - Returns a pass that converts a register
53 /// allocated function into raw machine code in a dynamically
54 /// allocated chunk of memory.
55 ///
56 FunctionPass *createEmitX86CodeToMemory();
57 
58 /// createX86PadShortFunctions - Return a pass that pads short functions
59 /// with NOOPs. This will prevent a stall when returning on the Atom.
60 FunctionPass *createX86PadShortFunctions();
61 /// createX86FixupLEAs - Return a a pass that selectively replaces
62 /// certain instructions (like add, sub, inc, dec, some shifts,
63 /// and some multiplies) by equivalent LEA instructions, in order
64 /// to eliminate execution delays in some Atom processors.
65 FunctionPass *createX86FixupLEAs();
66 
67 /// createX86CallFrameOptimization - Return a pass that optimizes
68 /// the code-size of x86 call sequences. This is done by replacing
69 /// esp-relative movs with pushes.
70 FunctionPass *createX86CallFrameOptimization();
71 
72 /// createX86WinEHStatePass - Return an IR pass that inserts EH registration
73 /// stack objects and explicit EH state updates. This pass must run after EH
74 /// preparation, which does Windows-specific but architecture-neutral
75 /// preparation.
76 FunctionPass *createX86WinEHStatePass();
77 
78 /// Return a Machine IR pass that expands X86-specific pseudo
79 /// instructions into a sequence of actual instructions. This pass
80 /// must run after prologue/epilogue insertion and before lowering
81 /// the MachineInstr to MC.
82 FunctionPass *createX86ExpandPseudoPass();
83 } // End llvm namespace
84 
85 #endif
FunctionPass * createX86CallFrameOptimization()
createX86CallFrameOptimization - Return a pass that optimizes the code-size of x86 call sequences...
FunctionPass * createX86IssueVZeroUpperPass()
createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions before each call to avoi...
FunctionPass * createX86PadShortFunctions()
createX86PadShortFunctions - Return a pass that pads short functions with NOOPs.
FunctionPass * createEmitX86CodeToMemory()
createX86EmitCodeToMemory - Returns a pass that converts a register allocated function into raw machi...
FunctionPass * createX86FixupLEAs()
createX86FixupLEAs - Return a a pass that selectively replaces certain instructions (like add...
FunctionPass * createX86ExpandPseudoPass()
Return a Machine IR pass that expands X86-specific pseudo instructions into a sequence of actual inst...
FunctionPass * createX86GlobalBaseRegPass()
createX86GlobalBaseRegPass - This pass initializes a global base register for PIC on x86-32...
FunctionPass * createX86FloatingPointStackifierPass()
createX86FloatingPointStackifierPass - This function returns a pass which converts floating point reg...
FunctionPass * createX86ISelDag(X86TargetMachine &TM, CodeGenOpt::Level OptLevel)
createX86ISelDag - This pass converts a legalized DAG into a X86-specific DAG, ready for instruction ...
FunctionPass * createX86WinEHStatePass()
createX86WinEHStatePass - Return an IR pass that inserts EH registration stack objects and explicit E...
FunctionPass * createCleanupLocalDynamicTLSPass()
createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses to local-dynamic TLS variab...