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 TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name)
static TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name)
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name)
static TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name)
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name)
static TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name)
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::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={})
static TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
static void build (::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute > discardableAttributes={})
static TemplateOp create (::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute > discardableAttributes={})
static TemplateOp create (::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute > discardableAttributes={})
::mlir::ParseResult parse (::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Detailed Description

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

Member Typedef Documentation

◆ Adaptor

◆ FoldAdaptor

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

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

◆ GenericAdaptor

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

◆ Properties

Member Function Documentation

◆ build() [1/6]

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 1351 of file Ops.cpp.inc.

◆ build() [2/6]

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

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

◆ build() [3/6]

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

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

◆ build() [4/6]

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

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

◆ build() [5/6]

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

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

◆ build() [6/6]

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

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

◆ computePropertiesHash()

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

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

◆ create() [1/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::llvm::StringRef sym_name )
static

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

◆ create() [2/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::mlir::StringAttr sym_name )
static

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

◆ create() [3/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::mlir::TypeRange resultTypes,
::llvm::StringRef sym_name )
static

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

◆ create() [4/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::mlir::TypeRange resultTypes,
::mlir::StringAttr sym_name )
static

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

◆ create() [5/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
::llvm::ArrayRef<::mlir::NamedAttribute > attributes = {} )
static

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

◆ create() [6/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::ImplicitLocOpBuilder & builder,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
const Properties & properties,
::llvm::ArrayRef<::mlir::NamedAttribute > discardableAttributes = {} )
static

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

◆ create() [7/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::llvm::StringRef sym_name )
static

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

◆ create() [8/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::mlir::StringAttr sym_name )
static

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

◆ create() [9/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::mlir::TypeRange resultTypes,
::llvm::StringRef sym_name )
static

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

◆ create() [10/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::mlir::TypeRange resultTypes,
::mlir::StringAttr sym_name )
static

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

◆ create() [11/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
::llvm::ArrayRef<::mlir::NamedAttribute > attributes = {} )
static

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

◆ create() [12/12]

TemplateOp llzk::polymorphic::TemplateOp::create ( ::mlir::OpBuilder & builder,
::mlir::Location location,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
const Properties & properties,
::llvm::ArrayRef<::mlir::NamedAttribute > discardableAttributes = {} )
static

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

◆ getAttributeNames()

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

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

◆ getBodyRegion()

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

Definition at line 1039 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 1164 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 1158 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 1150 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 1122 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 1102 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 1232 of file Ops.cpp.inc.

◆ getODSOperandIndexAndLength()

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

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

◆ getODSOperands()

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

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

◆ getODSResultIndexAndLength()

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

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

◆ getODSResults()

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

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

◆ getOperationName()

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

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

◆ getPropertiesAsAttr()

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

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

◆ getSymName()

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

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

◆ getSymNameAttr()

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

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

◆ getSymNameAttrName() [1/2]

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

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

◆ getSymNameAttrName() [2/2]

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

Definition at line 1011 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 1144 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 1138 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 1130 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 1108 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 1114 of file Ops.h.inc.

◆ parse()

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

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

◆ populateInherentAttrs()

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

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

◆ print()

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

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

◆ readProperties()

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

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

◆ setInherentAttr()

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

Definition at line 1238 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 1187 of file Ops.cpp.inc.

◆ setSymName()

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

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

◆ setSymNameAttr()

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

Definition at line 1057 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 1249 of file Ops.cpp.inc.

◆ verifyInvariants()

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

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

◆ verifyInvariantsImpl()

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

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

◆ writeProperties()

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

Definition at line 1265 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