summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-21 23:51:58 +0000
committerChris Lattner <sabre@nondot.org>2006-02-21 23:51:58 +0000
commitcd78df1e85a9993b7c9f3a44888eead2195a5161 (patch)
tree211f6dbd35777120c3b8a8064f9f31e8161ace53
parent5c79f98f15007aa84c65a5311beacbdb60bfbdf3 (diff)
downloadbcm5719-llvm-cd78df1e85a9993b7c9f3a44888eead2195a5161.tar.gz
bcm5719-llvm-cd78df1e85a9993b7c9f3a44888eead2195a5161.zip
expose the set of values types holdable in a regclass to clients
llvm-svn: 26307
-rw-r--r--llvm/include/llvm/Target/MRegisterInfo.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/llvm/include/llvm/Target/MRegisterInfo.h b/llvm/include/llvm/Target/MRegisterInfo.h
index 99d2929a018..2f6d1308cbe 100644
--- a/llvm/include/llvm/Target/MRegisterInfo.h
+++ b/llvm/include/llvm/Target/MRegisterInfo.h
@@ -44,8 +44,9 @@ public:
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 @@ public:
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,
OpenPOWER on IntegriCloud