MLIR  15.0.0git
Public Member Functions | List of all members
mlir::IROperand< DerivedT, IRValueT > Class Template Reference

A reference to a value, suitable for use as an operand of an operation. More...

#include "mlir/IR/UseDefLists.h"

+ Inheritance diagram for mlir::IROperand< DerivedT, IRValueT >:
+ Collaboration diagram for mlir::IROperand< DerivedT, IRValueT >:

Public Member Functions

 IROperand (Operation *owner)
 
 IROperand (Operation *owner, IRValueT value)
 
 IROperand (IROperand &&other)
 We support a move constructor so IROperand's can be in vectors, but this shouldn't be used by general clients. More...
 
IROperandoperator= (IROperand &&other)
 
IRValueT get () const
 Return the current value being used by this operand. More...
 
void set (IRValueT newValue)
 Set the current value being used by this operand. More...
 
bool is (IRValueT other) const
 Returns true if this operand contains the given value. More...
 
void drop ()
 Remove this use of the operand. More...
 
- Public Member Functions inherited from mlir::detail::IROperandBase
OperationgetOwner () const
 Return the owner of this operand. More...
 
IROperandBasegetNextOperandUsingThisValue ()
 Return the next operand on the use-list of the value we are referring to. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::detail::IROperandBase
 IROperandBase (Operation *owner)
 
 IROperandBase (IROperandBase &&other)
 
IROperandBaseoperator= (IROperandBase &&other)
 
 IROperandBase (const IROperandBase &use)=delete
 Operands are not copyable or assignable. More...
 
IROperandBaseoperator= (const IROperandBase &use)=delete
 
 ~IROperandBase ()
 
void drop ()
 Remove this use of the operand. More...
 
void removeFromCurrent ()
 Remove this operand from the current use list. More...
 
template<typename UseListT >
void insertInto (UseListT *useList)
 Insert this operand into the given use list. More...
 
- Protected Attributes inherited from mlir::detail::IROperandBase
IROperandBasenextUse = nullptr
 The next operand in the use-chain. More...
 
IROperandBase ** back = nullptr
 This points to the previous link in the use-chain. More...
 

Detailed Description

template<typename DerivedT, typename IRValueT>
class mlir::IROperand< DerivedT, IRValueT >

A reference to a value, suitable for use as an operand of an operation.

IRValueT is the root type to use for values this tracks. Derived operand types are expected to provide the following:

Definition at line 110 of file UseDefLists.h.

Constructor & Destructor Documentation

◆ IROperand() [1/3]

template<typename DerivedT, typename IRValueT>
mlir::IROperand< DerivedT, IRValueT >::IROperand ( Operation owner)
inline

Definition at line 112 of file UseDefLists.h.

◆ IROperand() [2/3]

template<typename DerivedT, typename IRValueT>
mlir::IROperand< DerivedT, IRValueT >::IROperand ( Operation owner,
IRValueT  value 
)
inline

Definition at line 113 of file UseDefLists.h.

◆ IROperand() [3/3]

template<typename DerivedT, typename IRValueT>
mlir::IROperand< DerivedT, IRValueT >::IROperand ( IROperand< DerivedT, IRValueT > &&  other)
inline

We support a move constructor so IROperand's can be in vectors, but this shouldn't be used by general clients.

Definition at line 120 of file UseDefLists.h.

Member Function Documentation

◆ drop()

template<typename DerivedT, typename IRValueT>
void mlir::IROperand< DerivedT, IRValueT >::drop ( )
inline

Remove this use of the operand.

Definition at line 148 of file UseDefLists.h.

◆ get()

template<typename DerivedT, typename IRValueT>
IRValueT mlir::IROperand< DerivedT, IRValueT >::get ( ) const
inline

◆ is()

template<typename DerivedT, typename IRValueT>
bool mlir::IROperand< DerivedT, IRValueT >::is ( IRValueT  other) const
inline

Returns true if this operand contains the given value.

Definition at line 145 of file UseDefLists.h.

◆ operator=()

template<typename DerivedT, typename IRValueT>
IROperand& mlir::IROperand< DerivedT, IRValueT >::operator= ( IROperand< DerivedT, IRValueT > &&  other)
inline

Definition at line 123 of file UseDefLists.h.

◆ set()

template<typename DerivedT, typename IRValueT>
void mlir::IROperand< DerivedT, IRValueT >::set ( IRValueT  newValue)
inline

Set the current value being used by this operand.

Definition at line 136 of file UseDefLists.h.

Referenced by mlir::linalg::fuseProducerOfTensor(), getTiledProducer(), and mlir::Operation::setOperand().


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