LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::polymorphic::TemplateOp Class Reference
Inheritance diagram for llzk::polymorphic::TemplateOp:
[legend]
Collaboration diagram for llzk::polymorphic::TemplateOp:
[legend]

Public Types

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

Public Member Functions

static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames ()
::mlir::StringAttr getSymNameAttrName ()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength (unsigned index)
::mlir::Operation::operand_range getODSOperands (unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength (unsigned index)
::mlir::Operation::result_range getODSResults (unsigned index)
::mlir::Region & getBodyRegion ()
void writeProperties (::mlir::DialectBytecodeWriter &writer)
::mlir::StringAttr getSymNameAttr ()
::llvm::StringRef getSymName ()
void setSymNameAttr (::mlir::StringAttr attr)
void setSymName (::llvm::StringRef attrValue)
::llvm::LogicalResult verifyInvariantsImpl ()
::llvm::LogicalResult verifyInvariants ()
::llvm::LogicalResult verify ()
 Verify the optional transform-carried name pattern against current parameters.
void print (::mlir::OpAsmPrinter &_odsPrinter)
template<TemplateSymbolBindingOp OpT>
inline ::llvm::iterator_range<::mlir::Region::op_iterator< OpT > > getConstOps ()
 Return ops of type OpT within the body region.
template<TemplateSymbolBindingOp OpT>
bool hasConstOps ()
 Return true if there are ops of type OpT within the body region.
template<TemplateSymbolBindingOp OpT>
size_t numConstOps ()
 Return the number of ops of type OpT within the body region.
template<TemplateSymbolBindingOp OpT>
::llvm::SmallVector<::mlir::Attribute > getConstNames ()
 Return the names of all ops of type OpT within the body region in the order they are defined.
template<TemplateSymbolBindingOp OpT>
bool hasConstNamed (::mlir::StringRef find)
 Return true if there is an op of type OpT with the given name within the body region.
template<TemplateSymbolBindingOp OpT>
bool hasConstNamed (::mlir::StringAttr find)
 Return true if there is an op of type OpT with the given name within the body region.
template<TemplateSymbolBindingOp OpT>
bool hasConstNamed (::mlir::FlatSymbolRefAttr find)
 Return true if there is an op of type OpT with the given name within the body region.
template<TemplateSymbolBindingOp OpT>
OpT getConstNamed (::mlir::StringRef find)
 Return the op of type OpT with the given name within the body region if it exists, else nullptr.
template<TemplateSymbolBindingOp OpT>
OpT getConstNamed (::mlir::StringAttr find)
 Return the op of type OpT with the given name within the body region if it exists, else nullptr.
template<TemplateSymbolBindingOp OpT>
OpT getConstNamed (::mlir::FlatSymbolRefAttr find)
 Return the op of type OpT with the given name within the body region if it exists, else nullptr.

Static Public Member Functions

::mlir::StringAttr getSymNameAttrName (::mlir::OperationName name)
static constexpr ::llvm::StringLiteral getOperationName ()
::llvm::LogicalResult setPropertiesFromAttr (Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::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)
::llvm::LogicalResult verifyInherentAttrs (::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult readProperties (::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name)
static void build (::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
::mlir::ParseResult parse (::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Detailed Description

Definition at line 827 of file Ops.h.inc.

Member Typedef Documentation

◆ Adaptor

◆ FoldAdaptor

using llzk::polymorphic::TemplateOp::FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>

Definition at line 834 of file Ops.h.inc.

◆ GenericAdaptor

Definition at line 833 of file Ops.h.inc.

◆ Properties

Member Function Documentation

◆ build() [1/5]

void llzk::polymorphic::TemplateOp::build ( ::mlir::OpBuilder & ,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
::llvm::ArrayRef<::mlir::NamedAttribute > attributes = {} )
static

Definition at line 1092 of file Ops.cpp.inc.

◆ build() [2/5]

void llzk::polymorphic::TemplateOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::llvm::StringRef sym_name )
static

Definition at line 1080 of file Ops.cpp.inc.

◆ build() [3/5]

void llzk::polymorphic::TemplateOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::StringAttr sym_name )
static

Definition at line 1068 of file Ops.cpp.inc.

◆ build() [4/5]

void llzk::polymorphic::TemplateOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::llvm::StringRef sym_name )
static

Definition at line 1085 of file Ops.cpp.inc.

◆ build() [5/5]

void llzk::polymorphic::TemplateOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::mlir::StringAttr sym_name )
static

Definition at line 1073 of file Ops.cpp.inc.

◆ computePropertiesHash()

llvm::hash_code llzk::polymorphic::TemplateOp::computePropertiesHash ( const Properties & prop)
static

Definition at line 1016 of file Ops.cpp.inc.

◆ getAttributeNames()

::llvm::ArrayRef<::llvm::StringRef > llzk::polymorphic::TemplateOp::getAttributeNames ( )
inline

Definition at line 836 of file Ops.h.inc.

◆ getBodyRegion()

::mlir::Region & llzk::polymorphic::TemplateOp::getBodyRegion ( )
inline

Definition at line 873 of file Ops.h.inc.

◆ getConstNamed() [1/3]

template<TemplateSymbolBindingOp OpT>
OpT llzk::polymorphic::TemplateOp::getConstNamed ( ::mlir::FlatSymbolRefAttr find)
inline

Return the op of type OpT with the given name within the body region if it exists, else nullptr.

Definition at line 985 of file Ops.h.inc.

◆ getConstNamed() [2/3]

template<TemplateSymbolBindingOp OpT>
OpT llzk::polymorphic::TemplateOp::getConstNamed ( ::mlir::StringAttr find)
inline

Return the op of type OpT with the given name within the body region if it exists, else nullptr.

Definition at line 979 of file Ops.h.inc.

◆ getConstNamed() [3/3]

template<TemplateSymbolBindingOp OpT>
OpT llzk::polymorphic::TemplateOp::getConstNamed ( ::mlir::StringRef find)
inline

Return the op of type OpT with the given name within the body region if it exists, else nullptr.

Definition at line 971 of file Ops.h.inc.

◆ getConstNames()

template<TemplateSymbolBindingOp OpT>
::llvm::SmallVector<::mlir::Attribute > llzk::polymorphic::TemplateOp::getConstNames ( )
inline

Return the names of all ops of type OpT within the body region in the order they are defined.

The names are returned as FlatSymbolRefAttr but the more general Attribute type is used in the return type since that's usually what's needed.

Definition at line 943 of file Ops.h.inc.

◆ getConstOps()

template<TemplateSymbolBindingOp OpT>
inline ::llvm::iterator_range<::mlir::Region::op_iterator< OpT > > llzk::polymorphic::TemplateOp::getConstOps ( )
inline

Return ops of type OpT within the body region.

Ops are returned in the order they are defined in the IR.

Definition at line 923 of file Ops.h.inc.

◆ getInherentAttr()

std::optional< mlir::Attribute > llzk::polymorphic::TemplateOp::getInherentAttr ( ::mlir::MLIRContext * ctx,
const Properties & prop,
llvm::StringRef name )
static

Definition at line 1021 of file Ops.cpp.inc.

◆ getODSOperandIndexAndLength()

std::pair< unsigned, unsigned > llzk::polymorphic::TemplateOp::getODSOperandIndexAndLength ( unsigned index)
inline

Definition at line 853 of file Ops.h.inc.

◆ getODSOperands()

::mlir::Operation::operand_range llzk::polymorphic::TemplateOp::getODSOperands ( unsigned index)
inline

Definition at line 857 of file Ops.h.inc.

◆ getODSResultIndexAndLength()

std::pair< unsigned, unsigned > llzk::polymorphic::TemplateOp::getODSResultIndexAndLength ( unsigned index)
inline

Definition at line 863 of file Ops.h.inc.

◆ getODSResults()

::mlir::Operation::result_range llzk::polymorphic::TemplateOp::getODSResults ( unsigned index)
inline

Definition at line 867 of file Ops.h.inc.

◆ getOperationName()

constexpr ::llvm::StringLiteral llzk::polymorphic::TemplateOp::getOperationName ( )
inlinestatic

Definition at line 849 of file Ops.h.inc.

◆ getPropertiesAsAttr()

mlir::Attribute llzk::polymorphic::TemplateOp::getPropertiesAsAttr ( ::mlir::MLIRContext * ctx,
const Properties & prop )
static

Definition at line 1000 of file Ops.cpp.inc.

◆ getSymName()

llvm::StringRef llzk::polymorphic::TemplateOp::getSymName ( )

Definition at line 1059 of file Ops.cpp.inc.

◆ getSymNameAttr()

::mlir::StringAttr llzk::polymorphic::TemplateOp::getSymNameAttr ( )
inline

Definition at line 886 of file Ops.h.inc.

◆ getSymNameAttrName() [1/2]

::mlir::StringAttr llzk::polymorphic::TemplateOp::getSymNameAttrName ( )
inline

Definition at line 841 of file Ops.h.inc.

◆ getSymNameAttrName() [2/2]

::mlir::StringAttr llzk::polymorphic::TemplateOp::getSymNameAttrName ( ::mlir::OperationName name)
inlinestatic

Definition at line 845 of file Ops.h.inc.

◆ hasConstNamed() [1/3]

template<TemplateSymbolBindingOp OpT>
bool llzk::polymorphic::TemplateOp::hasConstNamed ( ::mlir::FlatSymbolRefAttr find)
inline

Return true if there is an op of type OpT with the given name within the body region.

Definition at line 965 of file Ops.h.inc.

◆ hasConstNamed() [2/3]

template<TemplateSymbolBindingOp OpT>
bool llzk::polymorphic::TemplateOp::hasConstNamed ( ::mlir::StringAttr find)
inline

Return true if there is an op of type OpT with the given name within the body region.

Definition at line 959 of file Ops.h.inc.

◆ hasConstNamed() [3/3]

template<TemplateSymbolBindingOp OpT>
bool llzk::polymorphic::TemplateOp::hasConstNamed ( ::mlir::StringRef find)
inline

Return true if there is an op of type OpT with the given name within the body region.

Definition at line 951 of file Ops.h.inc.

◆ hasConstOps()

template<TemplateSymbolBindingOp OpT>
bool llzk::polymorphic::TemplateOp::hasConstOps ( )
inline

Return true if there are ops of type OpT within the body region.

Definition at line 929 of file Ops.h.inc.

◆ numConstOps()

template<TemplateSymbolBindingOp OpT>
size_t llzk::polymorphic::TemplateOp::numConstOps ( )
inline

Return the number of ops of type OpT within the body region.

Definition at line 935 of file Ops.h.inc.

◆ parse()

mlir::ParseResult llzk::polymorphic::TemplateOp::parse ( ::mlir::OpAsmParser & parser,
::mlir::OperationState & result )
static

Definition at line 1134 of file Ops.cpp.inc.

◆ populateInherentAttrs()

void llzk::polymorphic::TemplateOp::populateInherentAttrs ( ::mlir::MLIRContext * ctx,
const Properties & prop,
::mlir::NamedAttrList & attrs )
static

Definition at line 1034 of file Ops.cpp.inc.

◆ print()

void llzk::polymorphic::TemplateOp::print ( ::mlir::OpAsmPrinter & _odsPrinter)

Definition at line 1159 of file Ops.cpp.inc.

◆ readProperties()

llvm::LogicalResult llzk::polymorphic::TemplateOp::readProperties ( ::mlir::DialectBytecodeReader & reader,
::mlir::OperationState & state )
static

Definition at line 1047 of file Ops.cpp.inc.

◆ setInherentAttr()

void llzk::polymorphic::TemplateOp::setInherentAttr ( Properties & prop,
llvm::StringRef name,
mlir::Attribute value )
static

Definition at line 1027 of file Ops.cpp.inc.

◆ setPropertiesFromAttr()

llvm::LogicalResult llzk::polymorphic::TemplateOp::setPropertiesFromAttr ( Properties & prop,
::mlir::Attribute attr,
::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError )
static

Definition at line 977 of file Ops.cpp.inc.

◆ setSymName()

void llzk::polymorphic::TemplateOp::setSymName ( ::llvm::StringRef attrValue)

Definition at line 1064 of file Ops.cpp.inc.

◆ setSymNameAttr()

void llzk::polymorphic::TemplateOp::setSymNameAttr ( ::mlir::StringAttr attr)
inline

Definition at line 891 of file Ops.h.inc.

◆ verify()

LogicalResult llzk::polymorphic::TemplateOp::verify ( )

Verify the optional transform-carried name pattern against current parameters.

The pattern is generic discardable metadata, so this owner boundary is the one place that prevents malformed cardinality or element types from reaching refinement passes.

Definition at line 48 of file Ops.cpp.

◆ verifyInherentAttrs()

llvm::LogicalResult llzk::polymorphic::TemplateOp::verifyInherentAttrs ( ::mlir::OperationName opName,
::mlir::NamedAttrList & attrs,
llvm::function_ref<::mlir::InFlightDiagnostic()> emitError )
static

Definition at line 1038 of file Ops.cpp.inc.

◆ verifyInvariants()

llvm::LogicalResult llzk::polymorphic::TemplateOp::verifyInvariants ( )

Definition at line 1128 of file Ops.cpp.inc.

◆ verifyInvariantsImpl()

llvm::LogicalResult llzk::polymorphic::TemplateOp::verifyInvariantsImpl ( )

Definition at line 1112 of file Ops.cpp.inc.

◆ writeProperties()

void llzk::polymorphic::TemplateOp::writeProperties ( ::mlir::DialectBytecodeWriter & writer)

Definition at line 1054 of file Ops.cpp.inc.


The documentation for this class was generated from the following files:
  • build/include/llzk/Dialect/Polymorphic/IR/Ops.h.inc
  • lib/Dialect/Polymorphic/IR/Ops.cpp
  • build/include/llzk/Dialect/Polymorphic/IR/Ops.cpp.inc