Printer.cpp: Ditch addRequired/getAnalysis, because they leave
[oota-llvm.git] / lib / Target / X86 / X86.h
1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
2 //
3 // This file contains the entry points for global functions defined in the x86
4 // target library, as used by the LLVM JIT.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef TARGET_X86_H
9 #define TARGET_X86_H
10
11 #include <iosfwd>
12 class TargetMachine;
13 class Pass;
14
15 /// createSimpleX86InstructionSelector - This pass converts an LLVM function
16 /// into a machine code representation is a very simple peep-hole fashion.  The
17 /// generated code sucks but the implementation is nice and simple.
18 ///
19 Pass *createSimpleX86InstructionSelector(TargetMachine &TM);
20
21 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
22 /// optimizations.
23 ///
24 Pass *createX86PeepholeOptimizerPass();
25
26 /// createX86FloatingPointStackifierPass - This function returns a pass which
27 /// converts floating point register references and pseudo instructions into
28 /// floating point stack references and physical instructions.
29 ///
30 Pass *createX86FloatingPointStackifierPass();
31
32 /// createX86CodePrinterPass - Returns a pass that prints the X86
33 /// assembly code for a MachineFunction to the given output stream,
34 /// using the given target machine description.  This should work
35 /// regardless of whether the function is in SSA form.
36 ///
37 Pass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm);
38
39 /// X86EmitCodeToMemory - This function converts a register allocated function
40 /// into raw machine code in a dynamically allocated chunk of memory.  A pointer
41 /// to the start of the function is returned.
42 ///
43 Pass *createEmitX86CodeToMemory();
44
45 /// X86 namespace - This namespace contains all of the register and opcode enums
46 /// used by the X86 backend.
47 ///
48 namespace X86 {
49   // Defines a large number of symbolic names for X86 registers.  This defines a
50   // mapping from register name to register number.
51   //
52   enum Register {
53 #define R(ENUM, NAME, FLAGS, TSFLAGS, ALIAS_SET) ENUM,
54 #include "X86RegisterInfo.def"
55   };
56
57   // This defines a large number of symbolic names for X86 instruction opcodes.
58   enum Opcode {
59 #define I(ENUM, NAME, BASEOPCODE, FLAGS, TSFLAGS, IMPDEFS, IMPUSES) ENUM,
60 #include "X86InstrInfo.def"
61   };
62 }
63
64 #endif