MLIR  20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mlir::detail::IROperandBase Class Reference

This class is the base for IROperand, and provides all of the non-templated facilities for operand use management. More...

#include "mlir/IR/UseDefLists.h"

+ Inheritance diagram for mlir::detail::IROperandBase:

Public Member Functions

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...
 
void initChainWithUse (IROperandBase **self)
 Initialize the use-def chain by setting the back address to self and nextUse to nullptr. More...
 
void linkTo (IROperandBase *next)
 Link the current node to next. More...
 

Protected Member Functions

 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

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

This class is the base for IROperand, and provides all of the non-templated facilities for operand use management.

Definition at line 35 of file UseDefLists.h.

Constructor & Destructor Documentation

◆ IROperandBase() [1/3]

mlir::detail::IROperandBase::IROperandBase ( Operation owner)
inlineprotected

Definition at line 61 of file UseDefLists.h.

◆ IROperandBase() [2/3]

mlir::detail::IROperandBase::IROperandBase ( IROperandBase &&  other)
inlineprotected

Definition at line 62 of file UseDefLists.h.

◆ IROperandBase() [3/3]

mlir::detail::IROperandBase::IROperandBase ( const IROperandBase use)
protecteddelete

Operands are not copyable or assignable.

◆ ~IROperandBase()

mlir::detail::IROperandBase::~IROperandBase ( )
inlineprotected

Definition at line 77 of file UseDefLists.h.

References removeFromCurrent().

Member Function Documentation

◆ drop()

void mlir::detail::IROperandBase::drop ( )
inlineprotected

Remove this use of the operand.

Definition at line 80 of file UseDefLists.h.

References back, nextUse, and removeFromCurrent().

Referenced by mlir::IROperand< DerivedT, IRValueT >::drop().

◆ getNextOperandUsingThisValue()

IROperandBase* mlir::detail::IROperandBase::getNextOperandUsingThisValue ( )
inline

Return the next operand on the use-list of the value we are referring to.

This should generally only be used by the internal implementation details of the SSA machinery.

Definition at line 43 of file UseDefLists.h.

References nextUse.

Referenced by mlir::IRObjectWithUseList< OperandType >::hasOneUse(), mlir::ValueUseIterator< OperandType >::operator++(), and mlir::IRObjectWithUseList< OperandType >::shuffleUseList().

◆ getOwner()

Operation* mlir::detail::IROperandBase::getOwner ( ) const
inline

Return the owner of this operand.

Definition at line 38 of file UseDefLists.h.

Referenced by annotateConflict(), mlir::linalg::areElementwiseOpsFusable(), mlir::bufferization::AnalysisState::bufferizesToAliasOnly(), mlir::bufferization::AnalysisState::bufferizesToMemoryRead(), mlir::bufferization::AnalysisState::bufferizesToMemoryWrite(), checkAssumptionForFusingConsumer(), checkDoubleConsume(), cloneAndFuseFirstUse(), fuse(), mlir::linalg::fuseElementwiseOps(), mlir::linalg::fuseProducerOfTensor(), generateFusedElementwiseOpRegion(), mlir::bufferization::AnalysisState::getAliasingValues(), getIndexingMapOfProducerOperandsInCoordinatesOfFusedOp(), getSingleTerminatorUse(), mlir::ValueUseIterator< OperandType >::getUser(), handleResultImpl(), mlir::bufferization::AnalysisState::isInPlace(), isUseSpeciallyKnownDead(), isValueUsePotentialConsumer(), matchLinalgReduction(), mlir::mesh::maybeInsertSourceShardingAnnotation(), mlir::mesh::maybeInsertTargetShardingAnnotation(), mlir::affine::numEnclosingInvariantLoops(), numEnclosingInvariantLoops(), mlir::linalg::offsetIndices(), mlir::outlineSingleBlockRegion(), mlir::linalg::packTranspose(), mlir::RewriterBase::replaceAllUsesExcept(), mlir::scf::replaceAndCastForOpIterArg(), mlir::tensor::replaceInsertSliceWithTiledConsumer(), mlir::RewriterBase::replaceOpUsesWithinBlock(), setInPlaceOpOperand(), mlir::scf::tileAndFuseConsumerOfSlice(), transformToReduceLoop(), transposeOneLinalgOperandAndReplace(), mlir::dataflow::LivenessAnalysis::visitBranchOperand(), and mlir::dataflow::LivenessAnalysis::visitCallOperand().

◆ initChainWithUse()

void mlir::detail::IROperandBase::initChainWithUse ( IROperandBase **  self)
inline

Initialize the use-def chain by setting the back address to self and nextUse to nullptr.

Definition at line 47 of file UseDefLists.h.

References back, and nextUse.

◆ insertInto()

template<typename UseListT >
void mlir::detail::IROperandBase::insertInto ( UseListT *  useList)
inlineprotected

Insert this operand into the given use list.

Definition at line 97 of file UseDefLists.h.

References back, and nextUse.

◆ linkTo()

void mlir::detail::IROperandBase::linkTo ( IROperandBase next)
inline

Link the current node to next.

Definition at line 54 of file UseDefLists.h.

References back, and nextUse.

Referenced by mlir::IRObjectWithUseList< OperandType >::shuffleUseList().

◆ operator=() [1/2]

IROperandBase& mlir::detail::IROperandBase::operator= ( const IROperandBase use)
protecteddelete

◆ operator=() [2/2]

IROperandBase& mlir::detail::IROperandBase::operator= ( IROperandBase &&  other)
inlineprotected

Definition at line 65 of file UseDefLists.h.

References back, nextUse, and removeFromCurrent().

Referenced by mlir::IROperand< DerivedT, IRValueT >::operator=().

◆ removeFromCurrent()

void mlir::detail::IROperandBase::removeFromCurrent ( )
inlineprotected

Remove this operand from the current use list.

Definition at line 87 of file UseDefLists.h.

References back, and nextUse.

Referenced by drop(), operator=(), mlir::IROperand< DerivedT, IRValueT >::set(), and ~IROperandBase().

Member Data Documentation

◆ back

IROperandBase** mlir::detail::IROperandBase::back = nullptr
protected

This points to the previous link in the use-chain.

Definition at line 109 of file UseDefLists.h.

Referenced by drop(), initChainWithUse(), insertInto(), linkTo(), operator=(), and removeFromCurrent().

◆ nextUse

IROperandBase* mlir::detail::IROperandBase::nextUse = nullptr
protected

The next operand in the use-chain.

Definition at line 106 of file UseDefLists.h.

Referenced by drop(), getNextOperandUsingThisValue(), initChainWithUse(), insertInto(), linkTo(), operator=(), and removeFromCurrent().


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