forked from OSchip/llvm-project
MachineInstr: Explain the subtle semantics of uses()/defs()
llvm-svn: 242438
This commit is contained in:
parent
e7981cee24
commit
0693b145ec
|
@ -314,18 +314,24 @@ public:
|
|||
return iterator_range<const_mop_iterator>(explicit_operands().end(),
|
||||
operands_end());
|
||||
}
|
||||
/// Returns a range over all explicit operands that are register definitions.
|
||||
/// Implicit definition are not included!
|
||||
iterator_range<mop_iterator> defs() {
|
||||
return iterator_range<mop_iterator>(
|
||||
operands_begin(), operands_begin() + getDesc().getNumDefs());
|
||||
}
|
||||
/// \copydoc defs()
|
||||
iterator_range<const_mop_iterator> defs() const {
|
||||
return iterator_range<const_mop_iterator>(
|
||||
operands_begin(), operands_begin() + getDesc().getNumDefs());
|
||||
}
|
||||
/// Returns a range that includes all operands that are register uses.
|
||||
/// This may include unrelated operands which are not register uses.
|
||||
iterator_range<mop_iterator> uses() {
|
||||
return iterator_range<mop_iterator>(
|
||||
operands_begin() + getDesc().getNumDefs(), operands_end());
|
||||
}
|
||||
/// \copydoc uses()
|
||||
iterator_range<const_mop_iterator> uses() const {
|
||||
return iterator_range<const_mop_iterator>(
|
||||
operands_begin() + getDesc().getNumDefs(), operands_end());
|
||||
|
|
Loading…
Reference in New Issue