MLIR
20.0.0git
|
This class implements the result iterators for the Operation class. More...
#include "mlir/IR/ValueRange.h"
Classes | |
class | UseIterator |
This class implements a use iterator for a range of operation results. More... | |
Public Types | |
using | type_iterator = ValueTypeIterator< iterator > |
Returns the types of the values within this range. More... | |
using | type_range = ValueTypeRange< ResultRange > |
using | use_iterator = UseIterator |
using | use_range = iterator_range< use_iterator > |
using | user_iterator = ValueUserIterator< use_iterator, OpOperand > |
using | user_range = iterator_range< user_iterator > |
Public Member Functions | |
ResultRange (OpResult result) | |
type_range | getTypes () const |
type_range | getType () const |
use_range | getUses () const |
Returns a range of all uses of results within this range, which is useful for iterating over all uses. More... | |
use_iterator | use_begin () const |
use_iterator | use_end () const |
bool | use_empty () const |
Returns true if no results in this range have uses. More... | |
template<typename ValuesT > | |
std::enable_if_t<!std::is_convertible< ValuesT, Operation * >::value > | replaceAllUsesWith (ValuesT &&values) |
Replace all uses of results of this range with the provided 'values'. More... | |
void | replaceAllUsesWith (Operation *op) |
Replace all uses of results of this range with results of 'op'. More... | |
template<typename ValuesT > | |
std::enable_if_t<!std::is_convertible< ValuesT, Operation * >::value > | replaceUsesWithIf (ValuesT &&values, function_ref< bool(OpOperand &)> shouldReplace) |
Replace uses of results of this range with the provided 'values' if the given callback returns true. More... | |
void | replaceUsesWithIf (Operation *op, function_ref< bool(OpOperand &)> shouldReplace) |
Replace uses of results of this range with results of op if the given callback returns true. More... | |
user_range | getUsers () |
Returns a range of all users. More... | |
user_iterator | user_begin () |
user_iterator | user_end () |
This class implements the result iterators for the Operation class.
Definition at line 240 of file ValueRange.h.
using mlir::ResultRange::type_iterator = ValueTypeIterator<iterator> |
Returns the types of the values within this range.
Definition at line 252 of file ValueRange.h.
Definition at line 253 of file ValueRange.h.
Definition at line 262 of file ValueRange.h.
Definition at line 263 of file ValueRange.h.
Definition at line 317 of file ValueRange.h.
Definition at line 318 of file ValueRange.h.
ResultRange::ResultRange | ( | OpResult | result | ) |
Definition at line 580 of file OperationSupport.cpp.
ResultRange::type_range ResultRange::getType | ( | ) | const |
Definition at line 39 of file ValueRange.cpp.
References getTypes().
ResultRange::type_range ResultRange::getTypes | ( | ) | const |
Definition at line 35 of file ValueRange.cpp.
Referenced by mlir::impl::foldCastInterfaceOp(), getConstraintPredicates(), mlir::Operation::getResultTypes(), getType(), mlir::sparse_tensor::hasAnySparseResult(), and mlir::OpBuilder::tryFold().
ResultRange::user_range ResultRange::getUsers | ( | ) |
Returns a range of all users.
Definition at line 593 of file OperationSupport.cpp.
References user_begin(), and user_end().
ResultRange::use_range ResultRange::getUses | ( | ) | const |
Returns a range of all uses of results within this range, which is useful for iterating over all uses.
Definition at line 584 of file OperationSupport.cpp.
References use_begin(), and use_end().
Referenced by mlir::Operation::getUses().
void ResultRange::replaceAllUsesWith | ( | Operation * | op | ) |
Replace all uses of results of this range with results of 'op'.
Definition at line 634 of file OperationSupport.cpp.
References mlir::Operation::getResults(), and replaceAllUsesWith().
|
inline |
Replace all uses of results of this range with the provided 'values'.
The size of values
must match the size of this range.
Definition at line 281 of file ValueRange.h.
Referenced by replaceAllUsesWith(), and mlir::Operation::replaceAllUsesWith().
void ResultRange::replaceUsesWithIf | ( | Operation * | op, |
function_ref< bool(OpOperand &)> | shouldReplace | ||
) |
Replace uses of results of this range with results of op
if the given callback returns true.
Definition at line 638 of file OperationSupport.cpp.
References mlir::Operation::getResults(), and replaceUsesWithIf().
|
inline |
Replace uses of results of this range with the provided 'values' if the given callback returns true.
The size of values
must match the size of this range.
Definition at line 298 of file ValueRange.h.
Referenced by replaceUsesWithIf(), and mlir::Operation::replaceUsesWithIf().
ResultRange::use_iterator ResultRange::use_begin | ( | ) | const |
Definition at line 587 of file OperationSupport.cpp.
Referenced by getUses(), mlir::Operation::use_begin(), and user_begin().
|
inline |
Returns true if no results in this range have uses.
Definition at line 272 of file ValueRange.h.
References mlir::Value::use_empty().
Referenced by mlir::Operation::use_empty().
ResultRange::use_iterator ResultRange::use_end | ( | ) | const |
Definition at line 590 of file OperationSupport.cpp.
Referenced by getUses(), mlir::Operation::use_end(), and user_end().
ResultRange::user_iterator ResultRange::user_begin | ( | ) |
Definition at line 596 of file OperationSupport.cpp.
References use_begin().
Referenced by getUsers().
ResultRange::user_iterator ResultRange::user_end | ( | ) |
Definition at line 599 of file OperationSupport.cpp.
References use_end().
Referenced by getUsers().