LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::component::StructDefOp Class Reference
Inheritance diagram for llzk::component::StructDefOp:
[legend]
Collaboration diagram for llzk::component::StructDefOp:
[legend]

Public Types

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

Public Member Functions

static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames ()
::mlir::StringAttr getConstParamsAttrName ()
::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 ()
::mlir::ArrayAttr getConstParamsAttr ()
::std::optional< ::mlir::ArrayAttr > getConstParams ()
void setSymNameAttr (::mlir::StringAttr attr)
void setSymName (::llvm::StringRef attrValue)
void setConstParamsAttr (::mlir::ArrayAttr attr)
::mlir::Attribute removeConstParamsAttr ()
::llvm::LogicalResult verifyInvariantsImpl ()
::llvm::LogicalResult verifyInvariants ()
::llvm::LogicalResult verifyRegions ()
::llvm::LogicalResult verifySymbolUses (::mlir::SymbolTableCollection &symbolTable)
void print (::mlir::OpAsmPrinter &_odsPrinter)
StructType getType (::std::optional<::mlir::ArrayAttr > constParams={})
 Gets the StructType representing this struct.
StructType getType (::std::optional<::mlir::ArrayAttr > constParams={}) const
FieldDefOp getFieldDef (::mlir::StringAttr fieldName)
 Gets the FieldDefOp that defines the field in this structure with the given name, if present.
::std::vector< FieldDefOpgetFieldDefs ()
 Get all FieldDefOp in this structure.
::mlir::LogicalResult hasColumns ()
 Returns wether the struct defines fields marked as columns.
::llzk::function::FuncDefOp getComputeFuncOp ()
 Gets the FuncDefOp that defines the compute function in this structure, if present, or nullptr otherwise.
::llzk::function::FuncDefOp getConstrainFuncOp ()
 Gets the FuncDefOp that defines the constrain function in this structure, if present, or nullptr otherwise.
::llzk::function::FuncDefOp getComputeOrProductFuncOp ()
 Gets the FuncDefOp that defines the compute function in this structure, if present, or the product function otherwise.
::llzk::function::FuncDefOp getConstrainOrProductFuncOp ()
 Gets the FuncDefOp that defines the constrain function in this structure, if present, or the product function otherwise.
bool hasComputeConstrain ()
 Returns true iff this structure defines compute and constrain functions.
::std::string getHeaderString ()
 Generate header string, in the same format as the assemblyFormat.
bool hasConstParamsAttr ()
 Return false iff getConstParamsAttr() returns nullptr
bool hasParamNamed (::mlir::StringAttr find)
 Return true iff this StructDefOp has a parameter with the given name.
bool hasParamNamed (::mlir::FlatSymbolRefAttr find)
::mlir::SymbolRefAttr getFullyQualifiedName ()
 Return the full name for this struct from the root module, including any surrounding module scopes.
bool isMainComponent ()
 Return true iff this StructDefOp is named "Main".

Static Public Member Functions

::mlir::StringAttr getConstParamsAttrName (::mlir::OperationName name)
::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, ::mlir::ArrayAttr const_params)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::ArrayAttr const_params)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::ArrayAttr const_params)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::ArrayAttr const_params)
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 1122 of file Ops.h.inc.

Member Typedef Documentation

◆ Adaptor

◆ FoldAdaptor

using llzk::component::StructDefOp::FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>

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

◆ GenericAdaptor

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

◆ Properties

Member Function Documentation

◆ build() [1/5]

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

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

◆ build() [2/5]

void llzk::component::StructDefOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::llvm::StringRef sym_name,
::mlir::ArrayAttr const_params )
static

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

◆ build() [3/5]

void llzk::component::StructDefOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::StringAttr sym_name,
::mlir::ArrayAttr const_params )
static

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

◆ build() [4/5]

void llzk::component::StructDefOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::llvm::StringRef sym_name,
::mlir::ArrayAttr const_params )
static

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

◆ build() [5/5]

void llzk::component::StructDefOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::mlir::StringAttr sym_name,
::mlir::ArrayAttr const_params )
static

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

◆ computePropertiesHash()

llvm::hash_code llzk::component::StructDefOp::computePropertiesHash ( const Properties & prop)
static

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

◆ getAttributeNames()

::llvm::ArrayRef<::llvm::StringRef > llzk::component::StructDefOp::getAttributeNames ( )
inline

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

◆ getBodyRegion()

::mlir::Region & llzk::component::StructDefOp::getBodyRegion ( )
inline

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

◆ getComputeFuncOp()

FuncDefOp llzk::component::StructDefOp::getComputeFuncOp ( )

Gets the FuncDefOp that defines the compute function in this structure, if present, or nullptr otherwise.

Definition at line 423 of file Ops.cpp.

◆ getComputeOrProductFuncOp()

FuncDefOp llzk::component::StructDefOp::getComputeOrProductFuncOp ( )

Gets the FuncDefOp that defines the compute function in this structure, if present, or the product function otherwise.

Definition at line 431 of file Ops.cpp.

◆ getConstParams()

std::optional<::mlir::ArrayAttr > llzk::component::StructDefOp::getConstParams ( )

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

◆ getConstParamsAttr()

::mlir::ArrayAttr llzk::component::StructDefOp::getConstParamsAttr ( )
inline

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

◆ getConstParamsAttrName() [1/2]

::mlir::StringAttr llzk::component::StructDefOp::getConstParamsAttrName ( )
inline

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

◆ getConstParamsAttrName() [2/2]

::mlir::StringAttr llzk::component::StructDefOp::getConstParamsAttrName ( ::mlir::OperationName name)
inlinestatic

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

◆ getConstrainFuncOp()

FuncDefOp llzk::component::StructDefOp::getConstrainFuncOp ( )

Gets the FuncDefOp that defines the constrain function in this structure, if present, or nullptr otherwise.

Definition at line 427 of file Ops.cpp.

◆ getConstrainOrProductFuncOp()

FuncDefOp llzk::component::StructDefOp::getConstrainOrProductFuncOp ( )

Gets the FuncDefOp that defines the constrain function in this structure, if present, or the product function otherwise.

Definition at line 438 of file Ops.cpp.

◆ getFieldDef()

FieldDefOp llzk::component::StructDefOp::getFieldDef ( ::mlir::StringAttr fieldName)

Gets the FieldDefOp that defines the field in this structure with the given name, if present.

Definition at line 402 of file Ops.cpp.

◆ getFieldDefs()

std::vector< FieldDefOp > llzk::component::StructDefOp::getFieldDefs ( )

Get all FieldDefOp in this structure.

Definition at line 413 of file Ops.cpp.

◆ getFullyQualifiedName()

SymbolRefAttr llzk::component::StructDefOp::getFullyQualifiedName ( )

Return the full name for this struct from the root module, including any surrounding module scopes.

Definition at line 183 of file Ops.cpp.

◆ getHeaderString()

std::string llzk::component::StructDefOp::getHeaderString ( )

Generate header string, in the same format as the assemblyFormat.

Definition at line 155 of file Ops.cpp.

◆ getInherentAttr()

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

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

◆ getODSOperandIndexAndLength()

std::pair< unsigned, unsigned > llzk::component::StructDefOp::getODSOperandIndexAndLength ( unsigned index)
inline

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

◆ getODSOperands()

::mlir::Operation::operand_range llzk::component::StructDefOp::getODSOperands ( unsigned index)
inline

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

◆ getODSResultIndexAndLength()

std::pair< unsigned, unsigned > llzk::component::StructDefOp::getODSResultIndexAndLength ( unsigned index)
inline

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

◆ getODSResults()

::mlir::Operation::result_range llzk::component::StructDefOp::getODSResults ( unsigned index)
inline

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

◆ getOperationName()

constexpr ::llvm::StringLiteral llzk::component::StructDefOp::getOperationName ( )
inlinestatic

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

◆ getPropertiesAsAttr()

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

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

◆ getSymName()

llvm::StringRef llzk::component::StructDefOp::getSymName ( )

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

◆ getSymNameAttr()

::mlir::StringAttr llzk::component::StructDefOp::getSymNameAttr ( )
inline

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

◆ getSymNameAttrName() [1/2]

::mlir::StringAttr llzk::component::StructDefOp::getSymNameAttrName ( )
inline

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

◆ getSymNameAttrName() [2/2]

::mlir::StringAttr llzk::component::StructDefOp::getSymNameAttrName ( ::mlir::OperationName name)
inlinestatic

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

◆ getType() [1/2]

StructType llzk::component::StructDefOp::getType ( ::std::optional<::mlir::ArrayAttr > constParams = {})

Gets the StructType representing this struct.

If the constParams to use in the type are not given, the StructType will use this->getConstParamsAttr().

◆ getType() [2/2]

StructType llzk::component::StructDefOp::getType ( ::std::optional<::mlir::ArrayAttr > constParams = {}) const
inline

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

◆ hasColumns()

::mlir::LogicalResult llzk::component::StructDefOp::hasColumns ( )
inline

Returns wether the struct defines fields marked as columns.

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

◆ hasComputeConstrain()

bool llzk::component::StructDefOp::hasComputeConstrain ( )
inline

Returns true iff this structure defines compute and constrain functions.

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

◆ hasConstParamsAttr()

bool llzk::component::StructDefOp::hasConstParamsAttr ( )
inline

Return false iff getConstParamsAttr() returns nullptr

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

◆ hasParamNamed() [1/2]

bool llzk::component::StructDefOp::hasParamNamed ( ::mlir::FlatSymbolRefAttr find)
inline

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

◆ hasParamNamed() [2/2]

bool llzk::component::StructDefOp::hasParamNamed ( ::mlir::StringAttr find)

Return true iff this StructDefOp has a parameter with the given name.

◆ isMainComponent()

bool llzk::component::StructDefOp::isMainComponent ( )

Return true iff this StructDefOp is named "Main".

Definition at line 445 of file Ops.cpp.

◆ parse()

mlir::ParseResult llzk::component::StructDefOp::parse ( ::mlir::OpAsmParser & parser,
::mlir::OperationState & result )
static

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

◆ populateInherentAttrs()

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

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

◆ print()

void llzk::component::StructDefOp::print ( ::mlir::OpAsmPrinter & _odsPrinter)

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

◆ readProperties()

llvm::LogicalResult llzk::component::StructDefOp::readProperties ( ::mlir::DialectBytecodeReader & reader,
::mlir::OperationState & state )
static

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

◆ removeConstParamsAttr()

::mlir::Attribute llzk::component::StructDefOp::removeConstParamsAttr ( )
inline

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

◆ setConstParamsAttr()

void llzk::component::StructDefOp::setConstParamsAttr ( ::mlir::ArrayAttr attr)
inline

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

◆ setInherentAttr()

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

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

◆ setPropertiesFromAttr()

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

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

◆ setSymName()

void llzk::component::StructDefOp::setSymName ( ::llvm::StringRef attrValue)

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

◆ setSymNameAttr()

void llzk::component::StructDefOp::setSymNameAttr ( ::mlir::StringAttr attr)
inline

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

◆ verifyInherentAttrs()

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

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

◆ verifyInvariants()

llvm::LogicalResult llzk::component::StructDefOp::verifyInvariants ( )

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

◆ verifyInvariantsImpl()

llvm::LogicalResult llzk::component::StructDefOp::verifyInvariantsImpl ( )

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

◆ verifyRegions()

LogicalResult llzk::component::StructDefOp::verifyRegions ( )

Definition at line 314 of file Ops.cpp.

◆ verifySymbolUses()

LogicalResult llzk::component::StructDefOp::verifySymbolUses ( ::mlir::SymbolTableCollection & symbolTable)

Definition at line 189 of file Ops.cpp.

◆ writeProperties()

void llzk::component::StructDefOp::writeProperties ( ::mlir::DialectBytecodeWriter & writer)

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


The documentation for this class was generated from the following files: