Whitespace.
[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 "MCTargetDesc/X86BaseInfo.h"
19 #include "MCTargetDesc/X86MCTargetDesc.h"
20 #include "llvm/Support/DataTypes.h"
21 #include "llvm/Target/TargetMachine.h"
22
23 namespace llvm {
24
25 class FunctionPass;
26 class JITCodeEmitter;
27 class X86TargetMachine;
28
29 /// createX86ISelDag - This pass converts a legalized DAG into a
30 /// X86-specific DAG, ready for instruction scheduling.
31 ///
32 FunctionPass *createX86ISelDag(X86TargetMachine &TM,
33                                CodeGenOpt::Level OptLevel);
34
35 /// createGlobalBaseRegPass - This pass initializes a global base
36 /// register for PIC on x86-32.
37 FunctionPass* createGlobalBaseRegPass();
38
39 /// createCleanupLocalDynamicTLSPass() - This pass combines multiple accesses
40 /// to local-dynamic TLS variables so that the TLS base address for the module
41 /// is only fetched once per execution path through the function.
42 FunctionPass *createCleanupLocalDynamicTLSPass();
43
44 /// createX86FloatingPointStackifierPass - This function returns a pass which
45 /// converts floating point register references and pseudo instructions into
46 /// floating point stack references and physical instructions.
47 ///
48 FunctionPass *createX86FloatingPointStackifierPass();
49
50 /// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
51 /// before each call to avoid transition penalty between functions encoded with
52 /// AVX and SSE.
53 FunctionPass *createX86IssueVZeroUpperPass();
54
55 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
56 /// to the specified MCE object.
57 FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
58                                           JITCodeEmitter &JCE);
59
60 /// createX86EmitCodeToMemory - Returns a pass that converts a register
61 /// allocated function into raw machine code in a dynamically
62 /// allocated chunk of memory.
63 ///
64 FunctionPass *createEmitX86CodeToMemory();
65
66 /// createX86MaxStackAlignmentHeuristicPass - This function returns a pass
67 /// which determines whether the frame pointer register should be
68 /// reserved in case dynamic stack alignment is later required.
69 ///
70 FunctionPass *createX86MaxStackAlignmentHeuristicPass();
71
72 } // End llvm namespace
73
74 #endif