Put PHI/INLINEASM into the correct namespace.
[oota-llvm.git] / lib / Target / Target.td
index a82cb6c4e42e2ed8711ba56ba86485c61735d9cb..92179a5fafa5e8fc666d21ac41d7fb226c171bb0 100644 (file)
@@ -12,7 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-include "llvm/CodeGen/ValueTypes.td"
+// Include all information about LLVM intrinsics.
+include "llvm/Intrinsics.td"
 
 //===----------------------------------------------------------------------===//
 // Register file description - These classes are used to fill in the target
@@ -42,6 +43,13 @@ class Register<string n> {
   // registers.
   //
   list<Register> Aliases = [];
+  
+  // DwarfNumber - Number used internally by gcc/gdb to identify the register.
+  // These values can be determined by locating the <target>.h file in the
+  // directory llvmgcc/gcc/config/<target>/ and looking for REGISTER_NAMES.  The
+  // order of these names correspond to the enumeration used by gcc.  A value of
+  // -1 indicates that the gcc number is undefined.
+  int DwarfNumber = -1;
 }
 
 // RegisterGroup - This can be used to define instances of Register which
@@ -90,6 +98,20 @@ class RegisterClass<string namespace, list<ValueType> regTypes, int alignment,
 }
 
 
+//===----------------------------------------------------------------------===//
+// DwarfRegNum - This class provides a mapping of the llvm register enumeration
+// to the register numbering used by gcc and gdb.  These values are used by a
+// debug information writer (ex. DwarfWriter) to describe where values may be
+// located during execution.
+class DwarfRegNum<int N> {
+  // DwarfNumber - Number used internally by gcc/gdb to identify the register.
+  // These values can be determined by locating the <target>.h file in the
+  // directory llvmgcc/gcc/config/<target>/ and looking for REGISTER_NAMES.  The
+  // order of these names correspond to the enumeration used by gcc.  A value of
+  // -1 indicates that the gcc number is undefined.
+  int DwarfNumber = N;
+}
+
 //===----------------------------------------------------------------------===//
 // Pull in the common support for scheduling
 //
@@ -122,6 +144,9 @@ class Instruction {
   // code.
   list<Predicate> Predicates = [];
 
+  // Added complexity passed onto matching pattern.
+  int AddedComplexity  = 0;
+
   // These bits capture information about the high-level semantics of the
   // instruction.
   bit isReturn     = 0;     // Is this instruction a return instruction?
@@ -199,10 +224,12 @@ class InstrInfo {
 def PHI : Instruction {
   let OperandList = (ops variable_ops);
   let AsmString = "PHINODE";
+  let Namespace = "TargetInstrInfo";
 }
 def INLINEASM : Instruction {
   let OperandList = (ops variable_ops);
   let AsmString = "";
+  let Namespace = "TargetInstrInfo";
 }
 
 //===----------------------------------------------------------------------===//