Class PullOp
Defined in File DFGOps.h.inc
Inheritance Relationships
Base Type
public mlir::Op< PullOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type >::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands< 1 >::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpAsmOpInterface::Trait >
Class Documentation
-
class PullOp : public mlir::Op<PullOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpAsmOpInterface::Trait>
Public Types
-
using Adaptor = PullOpAdaptor
-
template<typename RangeT>
using GenericAdaptor = PullOpGenericAdaptor<RangeT>
-
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
-
using Properties = FoldAdaptor::Properties
Public Functions
-
inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
-
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
-
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
-
inline ::mlir::TypedValue<::mlir::dfg::OutputType> getReadPort()
-
inline ::mlir::Operation::operand_range getIndices()
-
inline ::mlir::OpOperand &getReadPortMutable()
-
::mlir::MutableOperandRange getIndicesMutable()
-
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
-
inline ::mlir::Operation::result_range getODSResults(unsigned index)
-
inline ::mlir::TypedValue<::mlir::Type> getToken()
-
void print(::mlir::OpAsmPrinter &p)
Prints a
dfg::PullOpin the custom assembly syntax consumed byparse.Emits
readPort[idx, ...] : portType, omitting the bracket list when no indices are present.
-
::llvm::LogicalResult verifyInvariantsImpl()
-
::llvm::LogicalResult verifyInvariants()
-
::llvm::LogicalResult verify()
Verifies that the index list is consistent with the port shape.
For scalar ports, no indices may be provided. For shaped ports, the number of index operands must exactly match the port rank. Either mismatch is a hard error because it would lead to out-of-bounds or under-specified element access at runtime.
-
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Assigns a pretty name to the token result of a
dfg::PullOp.The result is named
tokenNwhere N is the zero-based count ofPullOps that appear before this one inside the enclosing DFG node. The walk is interrupted as soon as the current operation is reached, keeping the traversal proportional to the number of pull operations in the node rather than the total size of the body.
Public Static Functions
-
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 void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value readPort, ValueRange indices = {})
Builds a
dfg::PullOpthat reads from a shaped or scalar port.The result type is inferred as the element type of the
dfg::OutputTypeport operand.- Parameters:
readPort – The
dfg::OutputTypeport to read from.indices – Element indices for shaped ports; must be empty for scalar ports.
-
static PullOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value readPort, ValueRange indices = {})
-
static PullOp create(::mlir::ImplicitLocOpBuilder &builder, Value readPort, ValueRange indices = {})
-
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Parses a
dfg::PullOpfrom its custom assembly syntax.The expected syntax is:
`dfg.pull` %readPort (`[` index-list `]`)? `:` port-type
The port type must be a
dfg::OutputType. Index operands, if present, must be ofindextype and address a specific element when pulling from a shaped port. The result type is derived as the element type of the port and is not written explicitly.
-
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
using Adaptor = PullOpAdaptor