Add new TargetRegisterClass::contains method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15783 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-08-15 22:19:38 +00:00
parent 6ff3f83ef0
commit f02b37da6f

View File

@ -65,6 +65,14 @@ public:
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,