MLIR 22.0.0git
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'.
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'.
void eraseOperands (unsigned start, unsigned length)
 Erase the operands held by the storage within the given range.
void eraseOperands (const BitVector &eraseIndices)
 Erase the operands held by the storage that have their corresponding bit set in eraseIndices.
MutableArrayRef< OpOperandgetOperands ()
 Get the operation operands held by the storage.
unsigned size ()
 Return the number of operands held in the storage.

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 1124 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ OperandStorage()

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

Definition at line 233 of file OperationSupport.cpp.

References false.

◆ ~OperandStorage()

detail::OperandStorage::~OperandStorage ( )

Definition at line 242 of file OperationSupport.cpp.

References getOperands().

Member Function Documentation

◆ eraseOperands() [1/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 307 of file OperationSupport.cpp.

References getOperands().

◆ eraseOperands() [2/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 293 of file OperationSupport.cpp.

References getOperands().

Referenced by setOperands().

◆ getOperands()

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

Get the operation operands held by the storage.

Definition at line 1148 of file OperationSupport.h.

References size().

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

◆ setOperands() [1/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 262 of file OperationSupport.cpp.

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

◆ setOperands() [2/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 253 of file OperationSupport.cpp.

Referenced by setOperands().

◆ size()

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

Return the number of operands held in the storage.

Definition at line 1151 of file OperationSupport.h.

Referenced by getOperands(), and setOperands().


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