[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 21 15:52:09 PST 2006
Changes in directory llvm/include/llvm/Target:
MRegisterInfo.h updated: 1.68 -> 1.69
---
Log message:
expose the set of values types holdable in a regclass to clients
---
Diffs of the changes: (+17 -1)
MRegisterInfo.h | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.68 llvm/include/llvm/Target/MRegisterInfo.h:1.69
--- llvm/include/llvm/Target/MRegisterInfo.h:1.68 Thu Feb 2 14:11:55 2006
+++ llvm/include/llvm/Target/MRegisterInfo.h Tue Feb 21 17:51:58 2006
@@ -44,8 +44,9 @@
typedef const unsigned* iterator;
typedef const unsigned* const_iterator;
+ typedef const MVT::ValueType* vt_iterator;
private:
- const MVT::ValueType* VTs;
+ const vt_iterator VTs;
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
const iterator RegsBegin, RegsEnd;
public:
@@ -84,6 +85,21 @@
return false;
}
+ /// vt_begin - Loop over all of the value types that can be represented by
+ /// values in this register class.
+ vt_iterator vt_begin() const {
+ return VTs;
+ }
+
+ /// vt_begin - Loop over all of the value types that can be represented by
+ /// values in this register class.
+ vt_iterator vt_end() const {
+ vt_iterator I = VTs;
+ while (*I != MVT::Other) ++I;
+ return I;
+ }
+
+
/// 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