MLIR 22.0.0git
mlir::detail::OpResultImpl Class Reference

This class provides the implementation for an operation result. More...

#include "mlir/IR/Value.h"

Inheritance diagram for mlir::detail::OpResultImpl:

Public Member Functions

OperationgetOwner () const
 Returns the parent operation of this result.
unsigned getResultNumber () const
 Returns the result number of this op result.
OpResultImplgetNextResultAtOffset (intptr_t offset)
 Returns the next operation result at offset after this result.
 ValueImpl (Type type, Kind kind)
Public Member Functions inherited from mlir::detail::ValueImpl
Type getType () const
 Return the type of this value.
void setType (Type type)
 Set the type of this value.
Kind getKind () const
 Return the kind of this value.
Public Member Functions inherited from mlir::IRObjectWithUseList< OpOperand >
 ~IRObjectWithUseList ()
void dropAllUses ()
 Drop all uses of this object from their respective owners.
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.
void shuffleUseList (ArrayRef< unsigned > indices)
 Shuffle the use-list chain according to the provided indices vector, which need to represent a valid shuffle.
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.
bool hasOneUse () const
 Returns true if this value has exactly one use.
bool use_empty () const
 Returns true if this value has no uses.
user_iterator user_begin () const
user_iterator user_end () const
user_range getUsers () const
 Returns a range of all users.

Static Public Member Functions

static bool classof (const ValueImpl *value)
static unsigned getMaxInlineResults ()
 Returns the maximum number of results that can be stored inline.

Additional Inherited Members

Public Types inherited from mlir::detail::ValueImpl
enum class  Kind { InlineOpResult = 0 , OutOfLineOpResult = 6 , BlockArgument = 7 }
 The enumeration represents the various different kinds of values the internal representation may take. More...
Public Types inherited from mlir::IRObjectWithUseList< OpOperand >
using use_iterator
using use_range
using user_iterator
using user_range
Protected Member Functions inherited from mlir::detail::ValueImpl
 ValueImpl (Type type, Kind kind)
LLVM_DUMP_METHOD Type debug_getType () const
 Expose a few methods explicitly for the debugger to call for visualization.
LLVM_DUMP_METHOD Kind debug_getKind () const
Protected Member Functions inherited from mlir::IRObjectWithUseList< OpOperand >
 IRObjectWithUseList ()=default
OpOperandgetFirstUse () const
 Return the first operand that is using this value, for use by custom use/def iterators.
Protected Attributes inherited from mlir::detail::ValueImpl
llvm::PointerIntPair< Type, 3, KindtypeAndKind
 The type of this result and the kind.

Detailed Description

This class provides the implementation for an operation result.

Definition at line 358 of file Value.h.

Member Function Documentation

◆ classof()

bool mlir::detail::OpResultImpl::classof ( const ValueImpl * value)
inlinestatic

◆ getMaxInlineResults()

unsigned mlir::detail::OpResultImpl::getMaxInlineResults ( )
inlinestatic

Returns the maximum number of results that can be stored inline.

Definition at line 380 of file Value.h.

References mlir::detail::ValueImpl::OutOfLineOpResult.

Referenced by getNextResultAtOffset(), getOwner(), mlir::detail::OutOfLineOpResult::getResultNumber(), and mlir::detail::InlineOpResult::InlineOpResult().

◆ getNextResultAtOffset()

OpResultImpl * OpResultImpl::getNextResultAtOffset ( intptr_t offset)

Returns the next operation result at offset after this result.

This method is useful when indexing the result storage of an operation, given that there is more than one kind of operation result (with the different kinds having different sizes) and that operations are stored in reverse order.

Definition at line 144 of file Value.cpp.

References getMaxInlineResults(), mlir::detail::ValueImpl::OutOfLineOpResult, and result.

◆ getOwner()

Operation * OpResultImpl::getOwner ( ) const

Returns the parent operation of this result.

Returns the parent operation of this trailing result.

Definition at line 115 of file Value.cpp.

References getMaxInlineResults(), mlir::detail::ValueImpl::InlineOpResult, mlir::detail::OutOfLineOpResult::outOfLineIndex, mlir::detail::ValueImpl::OutOfLineOpResult, and result.

◆ getResultNumber()

unsigned mlir::detail::OpResultImpl::getResultNumber ( ) const
inline

Returns the result number of this op result.

Return the result number of this op result.

Definition at line 425 of file Value.h.

◆ ValueImpl()

mlir::detail::ValueImpl::ValueImpl ( Type type,
Kind kind )
inline

Definition at line 72 of file Value.h.

Referenced by classof(), and mlir::detail::InlineOpResult::InlineOpResult().


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