Add reg clobber list for direct calls
[oota-llvm.git] / lib / Target / X86 / X86.h
index 135e55a4dd56182c1f4a6f6d5f94af2e493a9683..ee152d41b378e047868190f3dd68dfc34dfe66e8 100644 (file)
 #define TARGET_X86_H
 
 #include <iosfwd>
-class MFunction;
-class Function;
+class TargetMachine;
+class Pass;
 
-/// X86PrintCode - Print out the specified machine code function to the
-/// specified stream.  This function should work regardless of whether or not
-/// the function is in SSA form or not.
+/// createSimpleX86InstructionSelector - This pass converts an LLVM function
+/// into a machine code representation is a very simple peep-hole fashion.  The
+/// generated code sucks but the implementation is nice and simple.
 ///
-void X86PrintCode(const MFunction *MF, std::ostream &O);
+Pass *createSimpleX86InstructionSelector(TargetMachine &TM);
 
-/// X86SimpleInstructionSelection - This function converts an LLVM function into
-/// a machine code representation is a very simple peep-hole fashion.  The
-/// generated code sucks but the implementation is nice and simple.
+/// createSimpleRegisterAllocation - This function converts the specified
+/// machine code function from SSA form to use explicit registers by spilling
+/// every register.  Wow, great policy huh?
 ///
-MFunction *X86SimpleInstructionSelection(Function &F);
+Pass *createSimpleRegisterAllocator(TargetMachine &TM);
+Pass *createLocalRegisterAllocator(TargetMachine &TM);
 
-/// X86SimpleRegisterAllocation - This function converts the specified machine
-/// code function from SSA form to use explicit registers by spilling every
-/// register.  Wow, great policy huh?
+/// createX86CodePrinterPass - Print out the specified machine code function to
+/// the specified stream.  This function should work regardless of whether or
+/// not the function is in SSA form or not.
 ///
-inline void X86SimpleRegisterAllocation(MFunction *MF) {}
+Pass *createX86CodePrinterPass(TargetMachine &TM, std::ostream &O);
 
 /// X86EmitCodeToMemory - This function converts a register allocated function
 /// into raw machine code in a dynamically allocated chunk of memory.  A pointer
 /// to the start of the function is returned.
 ///
-inline void *X86EmitCodeToMemory(MFunction *MF) { return 0; }
-
+Pass *createEmitX86CodeToMemory(TargetMachine &TM);
 
 // Put symbolic names in a namespace to avoid causing these to clash with all
 // kinds of other things...
@@ -47,14 +47,14 @@ namespace X86 {
   // mapping from register name to register number.
   //
   enum Register {
-#define R(ENUM, NAME, FLAGS, TSFLAGS) ENUM,
+#define R(ENUM, NAME, FLAGS, TSFLAGS, ALIAS_SET) ENUM,
 #include "X86RegisterInfo.def"
   };
 
   // This defines a large number of symbolic names for X86 instruction opcodes.
   enum Opcode {
-#define I(ENUM, NAME, FLAGS, TSFLAGS) ENUM,
-#include "X86InstructionInfo.def"
+#define I(ENUM, NAME, BASEOPCODE, FLAGS, TSFLAGS, IMPDEFS, IMPUSES) ENUM,
+#include "X86InstrInfo.def"
   };
 }