Address Sanjoy's review comments to r256326

llvm-svn: 256356
This commit is contained in:
David Majnemer 2015-12-24 02:31:20 +00:00
parent 215d6a31b7
commit 5797a2934c
1 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,7 @@ public:
/// \brief Determine whether the passed use points to an argument operand.
bool isArgOperand(const Use *U) const {
assert(getInstruction() == U->getUser());
return arg_begin() <= U && U < arg_end();
}
@ -136,9 +137,10 @@ public:
/// \brief Determine whether the passed use points to a bundle operand.
bool isBundleOperand(const Use *U) const {
assert(getInstruction() == U->getUser());
if (!hasOperandBundles())
return false;
unsigned OperandNo = U->getOperandNo();
unsigned OperandNo = U - (*this)->op_begin();
return getBundleOperandsStartIndex() <= OperandNo &&
OperandNo < getBundleOperandsEndIndex();
}