forked from OSchip/llvm-project
Avoid one branch in Operation::getOpOperand()/getOperand() (NFC)
Skip the check on "hasOperandStorage" since the array will be indexed anyway. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111696
This commit is contained in:
parent
747b047290
commit
6f5c685839
|
@ -264,7 +264,9 @@ public:
|
|||
: MutableArrayRef<OpOperand>();
|
||||
}
|
||||
|
||||
OpOperand &getOpOperand(unsigned idx) { return getOpOperands()[idx]; }
|
||||
OpOperand &getOpOperand(unsigned idx) {
|
||||
return getOperandStorage().getOperands()[idx];
|
||||
}
|
||||
|
||||
// Support operand type iteration.
|
||||
using operand_type_iterator = operand_range::type_iterator;
|
||||
|
|
Loading…
Reference in New Issue