Class UpdateOp
Defined in File EmitHLSOps.h.inc
Inheritance Relationships
Base Type
public mlir::Op< UpdateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands< 2 >::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait >
Class Documentation
-
class UpdateOp : public mlir::Op<UpdateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait>
Public Types
-
using Adaptor = UpdateOpAdaptor
-
template<typename RangeT>
using GenericAdaptor = UpdateOpGenericAdaptor<RangeT>
-
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
-
using Properties = FoldAdaptor::Properties
Public Functions
-
inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
-
inline ::mlir::StringAttr getOperandSegmentSizesAttrName()
-
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
-
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
-
inline ::mlir::TypedValue<::mlir::Type> getVariable()
-
inline ::mlir::Operation::operand_range getIndices()
-
inline ::mlir::TypedValue<::mlir::Type> getNewValue()
-
inline ::mlir::Operation::operand_range getNewValueIndices()
-
inline ::mlir::OpOperand &getVariableMutable()
-
::mlir::MutableOperandRange getIndicesMutable()
-
inline ::mlir::OpOperand &getNewValueMutable()
-
::mlir::MutableOperandRange getNewValueIndicesMutable()
-
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
-
inline ::mlir::Operation::result_range getODSResults(unsigned index)
-
void writeProperties(::mlir::DialectBytecodeWriter &writer)
-
void print(::mlir::OpAsmPrinter &p)
Prints an
emithls::UpdateOpin the custom assembly syntax consumed byparse.
-
::llvm::LogicalResult verifyInvariantsImpl()
-
::llvm::LogicalResult verifyInvariants()
-
::llvm::LogicalResult verify()
Verifies an
emithls::UpdateOphas matching element types.When indices are present the element type of the shaped variable (or new value) is used for comparison; otherwise the operand type itself is used. The resolved types of
variableandnewValuemust be equal.
-
inline void getEffects(SmallVectorImpl<SideEffects::EffectInstance<MemoryEffects::Effect>> &effects)
Public Static Functions
-
static inline ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
-
static inline constexpr ::llvm::StringLiteral getOperationName()
-
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
-
static llvm::hash_code computePropertiesHash(const Properties &prop)
-
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
-
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
-
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
-
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
-
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value variable, Value newValue, SmallVector<Value> indices = {}, SmallVector<Value> newValueIndices = {})
Builds an
emithls::UpdateOp.- Parameters:
variable – The variable (or array) to update.
newValue – The value (or array) to write into
variable.indices – Index operands into
variable; empty for scalar assignment.newValueIndices – Index operands into
newValue; empty whennewValueis used as a whole.
-
static UpdateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value variable, Value newValue, SmallVector<Value> indices = {}, SmallVector<Value> newValueIndices = {})
-
static UpdateOp create(::mlir::ImplicitLocOpBuilder &builder, Value variable, Value newValue, SmallVector<Value> indices = {}, SmallVector<Value> newValueIndices = {})
-
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Parses an
emithls::UpdateOpfrom its custom assembly syntax.The expected syntax is:
`emithls.update` variable [`[` index-list `]`] `with` new-value [`[` index-list `]`] `:` variable-type `<-` new-value-type
Both index lists are optional; when absent the assignment targets or sources the variable/value as a whole. The
operandSegmentSizesattribute is derived from the parsed operand counts and stored automatically.
-
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
using Adaptor = UpdateOpAdaptor