Class PragmaPipelineOp

Inheritance Relationships

Base Type

  • public mlir::Op< PragmaPipelineOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::emithls::PragmaInterface::Trait >

Class Documentation

class PragmaPipelineOp : public mlir::Op<PragmaPipelineOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::emithls::PragmaInterface::Trait>

Public Types

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

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline ::mlir::StringAttr getIntervalAttrName()
inline ::mlir::StringAttr getStyleAttrName()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
inline ::mlir::IntegerAttr getIntervalAttr()
uint32_t getInterval()
inline ::mlir::emithls::PipelineStyleAttr getStyleAttr()
::mlir::emithls::PipelineStyle getStyle()
inline void setIntervalAttr(::mlir::IntegerAttr attr)
void setInterval(uint32_t attrValue)
inline void setStyleAttr(::mlir::emithls::PipelineStyleAttr attr)
void setStyle(::mlir::emithls::PipelineStyle attrValue)
void print(::mlir::OpAsmPrinter &p)

Prints a emithls::PragmaPipelineOp in the custom assembly syntax consumed by parse.

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

Verifies that a emithls::PragmaPipelineOp is well-formed.

Checks that:

  • the op is directly contained in a ForOp, and

  • the initiation interval (II) is greater than 0.

Public Static Functions

static inline ::mlir::StringAttr getIntervalAttrName(::mlir::OperationName name)
static inline ::mlir::StringAttr getStyleAttrName(::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, int32_t interval = 1, emithls::PipelineStyle style = emithls::PipelineStyle::flp)

Builds a emithls::PragmaPipelineOp with the given interval and pipeline style.

Parameters:
  • interval – The initiation interval (II); must be greater than 0.

  • style – The HLS pipeline style (e.g. PipelineStyle::flp).

static PragmaPipelineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, int32_t interval = 1, emithls::PipelineStyle style = emithls::PipelineStyle::flp)
static PragmaPipelineOp create(::mlir::ImplicitLocOpBuilder &builder, int32_t interval = 1, emithls::PipelineStyle style = emithls::PipelineStyle::flp)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Parses a emithls::PragmaPipelineOp from its custom assembly syntax.

The expected syntax is:

`emithls.pragma_pipeline` `II=`integer [`style=`style]

If style is omitted, defaults to flp.

static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context)

Canonicalization patterns for PragmaPipelineOp.

  • RemoveNestedPipeline: removes a PragmaPipelineOp that is redundant because a sibling or ancestor ForOp is already pipelined.

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