MLIR
17.0.0git
|
This class represents a single IR object that contains a use list. More...
#include "mlir/IR/UseDefLists.h"
Public Types | |
using | use_iterator = ValueUseIterator< OperandType > |
using | use_range = iterator_range< use_iterator > |
using | user_iterator = ValueUserIterator< use_iterator, OperandType > |
using | user_range = iterator_range< user_iterator > |
Public Member Functions | |
~IRObjectWithUseList () | |
void | dropAllUses () |
Drop all uses of this object from their respective owners. More... | |
template<typename ValueT > | |
void | replaceAllUsesWith (ValueT &&newValue) |
Replace all uses of 'this' value with the new value, updating anything in the IR that uses 'this' to use the other value instead. More... | |
use_iterator | use_begin () const |
use_iterator | use_end () const |
use_range | getUses () const |
Returns a range of all uses, which is useful for iterating over all uses. More... | |
bool | hasOneUse () const |
Returns true if this value has exactly one use. More... | |
bool | use_empty () const |
Returns true if this value has no uses. More... | |
user_iterator | user_begin () const |
user_iterator | user_end () const |
user_range | getUsers () const |
Returns a range of all users. More... | |
Protected Member Functions | |
IRObjectWithUseList ()=default | |
OperandType * | getFirstUse () const |
Return the first operand that is using this value, for use by custom use/def iterators. More... | |
This class represents a single IR object that contains a use list.
Definition at line 172 of file UseDefLists.h.
using mlir::IRObjectWithUseList< OperandType >::use_iterator = ValueUseIterator<OperandType> |
Definition at line 199 of file UseDefLists.h.
using mlir::IRObjectWithUseList< OperandType >::use_range = iterator_range<use_iterator> |
Definition at line 200 of file UseDefLists.h.
using mlir::IRObjectWithUseList< OperandType >::user_iterator = ValueUserIterator<use_iterator, OperandType> |
Definition at line 220 of file UseDefLists.h.
using mlir::IRObjectWithUseList< OperandType >::user_range = iterator_range<user_iterator> |
Definition at line 221 of file UseDefLists.h.
|
inline |
Definition at line 174 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_empty().
|
protecteddefault |
|
inline |
Drop all uses of this object from their respective owners.
Definition at line 179 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_begin(), and mlir::IRObjectWithUseList< OperandType >::use_empty().
Referenced by mlir::detail::ConversionPatternRewriterImpl::applyRewrites(), and mlir::RewriterBase::mergeBlocks().
|
inlineprotected |
Return the first operand that is using this value, for use by custom use/def iterators.
Definition at line 234 of file UseDefLists.h.
|
inline |
Returns a range of all users.
Definition at line 227 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::user_begin(), and mlir::IRObjectWithUseList< OperandType >::user_end().
|
inline |
Returns a range of all uses, which is useful for iterating over all uses.
Definition at line 206 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_begin(), and mlir::IRObjectWithUseList< OperandType >::use_end().
|
inline |
Returns true if this value has exactly one use.
Definition at line 209 of file UseDefLists.h.
References mlir::detail::IROperandBase::getNextOperandUsingThisValue().
|
inline |
Replace all uses of 'this' value with the new value, updating anything in the IR that uses 'this' to use the other value instead.
When this returns there are zero uses of 'this'.
Definition at line 188 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_begin(), and mlir::IRObjectWithUseList< OperandType >::use_empty().
Referenced by inlineIfCase().
|
inline |
|
inline |
Returns true if this value has no uses.
Definition at line 214 of file UseDefLists.h.
Referenced by mlir::IRObjectWithUseList< OperandType >::dropAllUses(), mlir::IRObjectWithUseList< OperandType >::replaceAllUsesWith(), and mlir::IRObjectWithUseList< OperandType >::~IRObjectWithUseList().
|
inline |
Definition at line 203 of file UseDefLists.h.
Referenced by mlir::IRObjectWithUseList< OperandType >::getUses(), and mlir::IRObjectWithUseList< OperandType >::user_end().
|
inline |
Definition at line 223 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_begin().
Referenced by mlir::IRObjectWithUseList< OperandType >::getUsers().
|
inline |
Definition at line 224 of file UseDefLists.h.
References mlir::IRObjectWithUseList< OperandType >::use_end().
Referenced by mlir::IRObjectWithUseList< OperandType >::getUsers().