MLIR  19.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 1078 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ OperandStorage()

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

Definition at line 239 of file OperationSupport.cpp.

◆ ~OperandStorage()

detail::OperandStorage::~OperandStorage ( )

Definition at line 248 of file OperationSupport.cpp.

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 313 of file OperationSupport.cpp.

◆ 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 299 of file OperationSupport.cpp.

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

◆ getOperands()

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

Get the operation operands held by the storage.

Definition at line 1102 of file OperationSupport.h.

References size().

Referenced by mlir::Operation::getOpOperand(), and mlir::Operation::getOpOperands().

◆ 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 268 of file OperationSupport.cpp.

◆ 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 259 of file OperationSupport.cpp.

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

◆ size()

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

Return the number of operands held in the storage.

Definition at line 1105 of file OperationSupport.h.

Referenced by mlir::Operation::getNumOperands(), and getOperands().


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