MLIR  16.0.0git
Classes | Public Types | Public Member Functions | List of all members
mlir::ResultRange Class Referencefinal

This class implements the result iterators for the Operation class. More...

#include "mlir/IR/ValueRange.h"

+ Inheritance diagram for mlir::ResultRange:
+ Collaboration diagram for mlir::ResultRange:

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 * >::valuereplaceAllUsesWith (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...
 
user_range getUsers ()
 Returns a range of all users. More...
 
user_iterator user_begin ()
 
user_iterator user_end ()
 

Detailed Description

This class implements the result iterators for the Operation class.

Definition at line 228 of file ValueRange.h.

Member Typedef Documentation

◆ type_iterator

Returns the types of the values within this range.

Definition at line 240 of file ValueRange.h.

◆ type_range

Definition at line 241 of file ValueRange.h.

◆ use_iterator

Definition at line 250 of file ValueRange.h.

◆ use_range

Definition at line 251 of file ValueRange.h.

◆ user_iterator

Definition at line 285 of file ValueRange.h.

◆ user_range

Definition at line 286 of file ValueRange.h.

Constructor & Destructor Documentation

◆ ResultRange()

ResultRange::ResultRange ( OpResult  result)

Definition at line 533 of file OperationSupport.cpp.

Member Function Documentation

◆ getType()

ResultRange::type_range ResultRange::getType ( ) const

Definition at line 39 of file ValueRange.cpp.

References getTypes().

◆ getTypes()

ResultRange::type_range ResultRange::getTypes ( ) const

◆ getUsers()

ResultRange::user_range ResultRange::getUsers ( )

Returns a range of all users.

Definition at line 546 of file OperationSupport.cpp.

References user_begin(), and user_end().

◆ getUses()

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 537 of file OperationSupport.cpp.

References use_begin(), and use_end().

Referenced by mlir::Operation::getUses().

◆ replaceAllUsesWith() [1/2]

void ResultRange::replaceAllUsesWith ( Operation op)

Replace all uses of results of this range with results of 'op'.

Definition at line 587 of file OperationSupport.cpp.

References mlir::Operation::getResults(), and replaceAllUsesWith().

◆ replaceAllUsesWith() [2/2]

template<typename ValuesT >
std::enable_if_t<!std::is_convertible<ValuesT, Operation *>::value> mlir::ResultRange::replaceAllUsesWith ( ValuesT &&  values)
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 269 of file ValueRange.h.

Referenced by replaceAllUsesWith(), mlir::Operation::replaceAllUsesWith(), and replaceMaterialization().

◆ use_begin()

ResultRange::use_iterator ResultRange::use_begin ( ) const

Definition at line 540 of file OperationSupport.cpp.

Referenced by getUses(), mlir::Operation::use_begin(), and user_begin().

◆ use_empty()

bool mlir::ResultRange::use_empty ( ) const
inline

Returns true if no results in this range have uses.

Definition at line 260 of file ValueRange.h.

References mlir::Value::use_empty().

Referenced by mlir::Operation::use_empty().

◆ use_end()

ResultRange::use_iterator ResultRange::use_end ( ) const

Definition at line 543 of file OperationSupport.cpp.

Referenced by getUses(), mlir::Operation::use_end(), and user_end().

◆ user_begin()

ResultRange::user_iterator ResultRange::user_begin ( )

Definition at line 549 of file OperationSupport.cpp.

References use_begin().

Referenced by getUsers().

◆ user_end()

ResultRange::user_iterator ResultRange::user_end ( )

Definition at line 552 of file OperationSupport.cpp.

References use_end().

Referenced by getUsers().


The documentation for this class was generated from the following files: