Class InstantiateOp

Inheritance Relationships

Base Type

  • public mlir::Op< InstantiateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::dfg::NodeInterface::Trait >

Class Documentation

class InstantiateOp : public mlir::Op<InstantiateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::dfg::NodeInterface::Trait>

Public Types

using Adaptor = InstantiateOpAdaptor
template<typename RangeT>
using GenericAdaptor = InstantiateOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline ::mlir::StringAttr getActorAttrName()
inline ::mlir::StringAttr getOffloadedAttrName()
inline ::mlir::StringAttr getOperandSegmentSizesAttrName()
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::Operation::operand_range getInputs()
inline ::mlir::Operation::operand_range getOutputs()
::mlir::MutableOperandRange getInputsMutable()
::mlir::MutableOperandRange getOutputsMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
inline ::mlir::SymbolRefAttr getActorAttr()
::mlir::SymbolRefAttr getActor()
inline ::mlir::dfg::OffloadHardwareAttr getOffloadedAttr()
::std::optional<::mlir::dfg::OffloadHardware> getOffloaded()
inline void setActorAttr(::mlir::SymbolRefAttr attr)
inline void setOffloadedAttr(::mlir::dfg::OffloadHardwareAttr attr)
void setOffloaded(::std::optional<::mlir::dfg::OffloadHardware> attrValue)
inline ::mlir::Attribute removeOffloadedAttr()
void print(::mlir::OpAsmPrinter &p)

Prints an InstantiateOp in the custom assembly syntax consumed by parse.

Emits the optional offloaded=HW annotation, the actor symbol name, optional inputs(...) and outputs(...) operand lists, and the trailing function type.

::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verify()

Verifies that the instantiated actor exists and has a matching signature.

Looks up the referenced actor by symbol and confirms that its base function type matches the one declared by this InstantiateOp. A missing actor or a type mismatch are both hard errors because either condition would leave port connections unresolvable at code-generation time.

inline std::string getNodeName()
inline unsigned getNumInputPorts()
inline Value getInputPort(unsigned index)
inline SmallVector<Type> getInputPortTypes()
inline SmallVector<Value> getInputPorts()
inline unsigned getNumOutputPorts()
inline Value getOutputPort(unsigned index)
inline SmallVector<Type> getOutputPortTypes()
inline SmallVector<Value> getOutputPorts()
inline Operation *getInstantiatedOperation()

Finds the instantiated process or operator in this operation.

inline FunctionType getFunctionType()

Constructs a function type from the inputs/outputs types.

Public Static Functions

static inline ::mlir::StringAttr getActorAttrName(::mlir::OperationName name)
static inline ::mlir::StringAttr getOffloadedAttrName(::mlir::OperationName name)
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, StringRef actorName, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, StringRef actorName, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::ImplicitLocOpBuilder &builder, StringRef actorName, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ProcessOp actorProcess, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ProcessOp actorProcess, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::ImplicitLocOpBuilder &builder, ProcessOp actorProcess, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, OperatorOp actorOperator, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, OperatorOp actorOperator, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static InstantiateOp create(::mlir::ImplicitLocOpBuilder &builder, OperatorOp actorOperator, ValueRange inputs, ValueRange outputs, std::optional<OffloadHardware> offloaded = std::nullopt)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Parses an InstantiateOp from its custom assembly syntax.

The expected syntax is:

`dfg.instantiate`
  (`offloaded` (`=` hardware-name)?)?
  @actorName
  (`inputs` `(` operand-list `)`)?
  (`outputs` `(` operand-list `)`)?
  `:` func-type

The optional offloaded keyword enables hardware offloading; appending =name selects a specific backend (default: EmitHLS). The inputs/outputs lists contain pre-existing SSA operands rather than new declarations, and port types are not written inline — they are resolved through the trailing FunctionType. The operandSegmentSizes attribute is derived automatically from the parsed operand counts.

static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)

Public Static Attributes

static constexpr int odsIndex_inputs = 0
static constexpr int odsIndex_outputs = 1