Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/IR/OperationSupport.h
Show First 20 Lines • Show All 672 Lines • ▼ Show 20 Lines | public: | ||||
/// Construct a new mutable range from the given operand, operand start index, | /// Construct a new mutable range from the given operand, operand start index, | ||||
/// and range length. `operandSegments` is an optional set of operand segments | /// and range length. `operandSegments` is an optional set of operand segments | ||||
/// to be updated when mutating the operand list. | /// to be updated when mutating the operand list. | ||||
MutableOperandRange(Operation *owner, unsigned start, unsigned length, | MutableOperandRange(Operation *owner, unsigned start, unsigned length, | ||||
ArrayRef<OperandSegment> operandSegments = llvm::None); | ArrayRef<OperandSegment> operandSegments = llvm::None); | ||||
MutableOperandRange(Operation *owner); | MutableOperandRange(Operation *owner); | ||||
/// Slice this range into a sub range, with the additional operand segment. | |||||
MutableOperandRange slice(unsigned subStart, unsigned subLen, | |||||
Optional<OperandSegment> segment = llvm::None); | |||||
/// Append the given values to the range. | /// Append the given values to the range. | ||||
void append(ValueRange values); | void append(ValueRange values); | ||||
/// Assign this range to the given values. | /// Assign this range to the given values. | ||||
void assign(ValueRange values); | void assign(ValueRange values); | ||||
/// Assign the range to the given value. | /// Assign the range to the given value. | ||||
void assign(Value value); | void assign(Value value); | ||||
/// Erase the operands within the given sub-range. | /// Erase the operands within the given sub-range. | ||||
void erase(unsigned subStart, unsigned subLen = 1); | void erase(unsigned subStart, unsigned subLen = 1); | ||||
/// Clear this range and erase all of the operands. | /// Clear this range and erase all of the operands. | ||||
void clear(); | void clear(); | ||||
/// Returns the current size of the range. | /// Returns the current size of the range. | ||||
unsigned size() const { return length; } | unsigned size() const { return length; } | ||||
/// Allow implicit conversion to an OperandRange. | /// Allow implicit conversion to an OperandRange. | ||||
operator OperandRange() const; | operator OperandRange() const; | ||||
/// Returns the owning operation. | |||||
Operation *getOwner() const { return owner; } | |||||
private: | private: | ||||
/// Update the length of this range to the one provided. | /// Update the length of this range to the one provided. | ||||
void updateLength(unsigned newLength); | void updateLength(unsigned newLength); | ||||
/// The owning operation of this range. | /// The owning operation of this range. | ||||
Operation *owner; | Operation *owner; | ||||
/// The start index of the operand range within the owner operand list, and | /// The start index of the operand range within the owner operand list, and | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |