MLIR  16.0.0git
Public Member Functions | List of all members
mlir::detail::OperandStorage Class Reference

This class handles the management of operation operands. More...

#include "mlir/IR/OperationSupport.h"

Public Member Functions

 OperandStorage (Operation *owner, OpOperand *trailingOperands, ValueRange values)
 
 ~OperandStorage ()
 
void setOperands (Operation *owner, ValueRange values)
 Replace the operands contained in the storage with the ones provided in 'values'. More...
 
void setOperands (Operation *owner, unsigned start, unsigned length, ValueRange operands)
 Replace the operands beginning at 'start' and ending at 'start' + 'length' with the ones provided in 'operands'. More...
 
void eraseOperands (unsigned start, unsigned length)
 Erase the operands held by the storage within the given range. More...
 
void eraseOperands (const BitVector &eraseIndices)
 Erase the operands held by the storage that have their corresponding bit set in eraseIndices. More...
 
MutableArrayRef< OpOperandgetOperands ()
 Get the operation operands held by the storage. More...
 
unsigned size ()
 Return the number of operands held in the storage. More...
 

Detailed Description

This class handles the management of operation operands.

Operands are stored either in a trailing array, or a dynamically resizable vector.

Definition at line 707 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ OperandStorage()

detail::OperandStorage::OperandStorage ( Operation owner,
OpOperand trailingOperands,
ValueRange  values 
)

Definition at line 221 of file OperationSupport.cpp.

◆ ~OperandStorage()

detail::OperandStorage::~OperandStorage ( )

Definition at line 230 of file OperationSupport.cpp.

References getOperands().

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

Member Function Documentation

◆ eraseOperands() [1/2]

void detail::OperandStorage::eraseOperands ( unsigned  start,
unsigned  length 
)

Erase the operands held by the storage within the given range.

Erase an operand held by the storage.

Definition at line 281 of file OperationSupport.cpp.

References getOperands().

Referenced by setOperands().

◆ eraseOperands() [2/2]

void detail::OperandStorage::eraseOperands ( const BitVector &  eraseIndices)

Erase the operands held by the storage that have their corresponding bit set in eraseIndices.

Definition at line 295 of file OperationSupport.cpp.

References getOperands(), and max().

◆ getOperands()

MutableArrayRef<OpOperand> mlir::detail::OperandStorage::getOperands ( )
inline

Get the operation operands held by the storage.

Definition at line 731 of file OperationSupport.h.

Referenced by eraseOperands(), setOperands(), and ~OperandStorage().

◆ setOperands() [1/2]

void detail::OperandStorage::setOperands ( Operation owner,
ValueRange  values 
)

Replace the operands contained in the storage with the ones provided in 'values'.

Definition at line 241 of file OperationSupport.cpp.

Referenced by mlir::Operation::setOperands(), and setOperands().

◆ setOperands() [2/2]

void detail::OperandStorage::setOperands ( Operation owner,
unsigned  start,
unsigned  length,
ValueRange  operands 
)

Replace the operands beginning at 'start' and ending at 'start' + 'length' with the ones provided in 'operands'.

'operands' may be smaller or larger than the range pointed to by 'start'+'length'.

Definition at line 250 of file OperationSupport.cpp.

References eraseOperands(), getOperands(), setOperands(), and size().

◆ size()

unsigned mlir::detail::OperandStorage::size ( )
inline

Return the number of operands held in the storage.

Definition at line 734 of file OperationSupport.h.

Referenced by setOperands().


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