[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 15 15:19:50 PDT 2004



Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.47 -> 1.48
---
Log message:

Add new TargetRegisterClass::contains method


---
Diffs of the changes:  (+8 -0)

Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.47 llvm/include/llvm/Target/MRegisterInfo.h:1.48
--- llvm/include/llvm/Target/MRegisterInfo.h:1.47	Sun Aug 15 17:14:19 2004
+++ llvm/include/llvm/Target/MRegisterInfo.h	Sun Aug 15 17:19:38 2004
@@ -65,6 +65,14 @@
     return RegsBegin[i];
   }
 
+  /// contains - Return true if the specified register is included in this
+  /// register class.
+  bool contains(unsigned Reg) const {
+    for (iterator I = begin(), E = end(); I != E; ++I)
+      if (*I == Reg) return true;
+    return false;
+  }
+
   /// allocation_order_begin/end - These methods define a range of registers
   /// which specify the registers in this class that are valid to register
   /// allocate, and the preferred order to allocate them in.  For example,






More information about the llvm-commits mailing list