forked from OSchip/llvm-project
Address Sanjoy's review comments to r256326
llvm-svn: 256356
This commit is contained in:
parent
215d6a31b7
commit
5797a2934c
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue