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

Public Member Functions

::llvm::FailureOr<::mlir::Type > getRecord (::llvm::StringRef name, ::llvm::function_ref<::mlir::InFlightDiagnostic()>) const
 Searches a record by name.
::llvm::StringMap<::mlir::Type > getRecordMap () const
 Returns the records in map form.
::mlir::Type getSingleRecordType (::mlir::StringAttr name) const
 Creates a PodType containing only the requested record.
void print (::mlir::AsmPrinter &odsPrinter) const
::llvm::ArrayRef<::llzk::pod::RecordAttr > getRecords () const
::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type > > getSubelementIndexMap () const
 Required by DestructurableTypeInterface / SROA pass.
::mlir::Type getTypeAtIndex (::mlir::Attribute index) const
 Required by DestructurableTypeInterface / SROA pass.

Static Public Member Functions

static PodType fromInitialValues (::mlir::MLIRContext *ctx, InitializedRecords init)
 Creates a new type from a set of initialized records.
static PodType get (::mlir::MLIRContext *context, ::llvm::ArrayRef<::llzk::pod::RecordAttr > records)
static PodType getChecked (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::ArrayRef<::llzk::pod::RecordAttr > records)
::llvm::LogicalResult verify (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef<::llzk::pod::RecordAttr > records)
::llvm::LogicalResult verifyInvariants (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef<::llzk::pod::RecordAttr > records)
static constexpr ::llvm::StringLiteral getMnemonic ()
::mlir::Type parse (::mlir::AsmParser &odsParser)

Static Public Attributes

static constexpr ::llvm::StringLiteral name = "pod.type"
static constexpr ::llvm::StringLiteral dialectName = "pod"

Detailed Description

Definition at line 44 of file Types.h.inc.

Member Function Documentation

◆ fromInitialValues()

PodType llzk::pod::PodType::fromInitialValues ( ::mlir::MLIRContext * ctx,
InitializedRecords init )
static

Creates a new type from a set of initialized records.

The records are derived from the names and the types of the values.

Definition at line 42 of file Types.cpp.

◆ get()

PodType llzk::pod::PodType::get ( ::mlir::MLIRContext * context,
::llvm::ArrayRef<::llzk::pod::RecordAttr > records )
static

Definition at line 70 of file Types.cpp.inc.

◆ getChecked()

PodType llzk::pod::PodType::getChecked ( ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError,
::mlir::MLIRContext * context,
::llvm::ArrayRef<::llzk::pod::RecordAttr > records )
static

Definition at line 74 of file Types.cpp.inc.

◆ getMnemonic()

constexpr ::llvm::StringLiteral llzk::pod::PodType::getMnemonic ( )
inlinestatic

Definition at line 73 of file Types.h.inc.

◆ getRecord()

FailureOr< Type > llzk::pod::PodType::getRecord ( ::llvm::StringRef name,
::llvm::function_ref<::mlir::InFlightDiagnostic()>  ) const

Searches a record by name.

If you plan to make several queries to this type, it's better to generate the map once via getRecordMap() and query it instead of repeatedly calling getRecord().

Definition at line 50 of file Types.cpp.

◆ getRecordMap()

llvm::StringMap< Type > llzk::pod::PodType::getRecordMap ( ) const

Returns the records in map form.

If you plan to make several queries to this type, it's better to generate the map once via getRecordMap() and query it instead of repeatedly calling getRecord().

Definition at line 59 of file Types.cpp.

◆ getRecords()

llvm::ArrayRef<::llzk::pod::RecordAttr > llzk::pod::PodType::getRecords ( ) const

Definition at line 117 of file Types.cpp.inc.

◆ getSingleRecordType()

Type llzk::pod::PodType::getSingleRecordType ( ::mlir::StringAttr name) const

Creates a PodType containing only the requested record.

Definition at line 67 of file Types.cpp.

◆ getSubelementIndexMap()

std::optional< DenseMap< Attribute, Type > > llzk::pod::PodType::getSubelementIndexMap ( ) const

Required by DestructurableTypeInterface / SROA pass.

Definition at line 77 of file Types.cpp.

◆ getTypeAtIndex()

Type llzk::pod::PodType::getTypeAtIndex ( ::mlir::Attribute index) const

Required by DestructurableTypeInterface / SROA pass.

Definition at line 86 of file Types.cpp.

◆ parse()

mlir::Type llzk::pod::PodType::parse ( ::mlir::AsmParser & odsParser)
static

Definition at line 84 of file Types.cpp.inc.

◆ print()

void llzk::pod::PodType::print ( ::mlir::AsmPrinter & odsPrinter) const

Definition at line 109 of file Types.cpp.inc.

◆ verify()

LogicalResult llzk::pod::PodType::verify ( ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError,
::llvm::ArrayRef<::llzk::pod::RecordAttr > records )
static

Definition at line 28 of file Types.cpp.

◆ verifyInvariants()

llvm::LogicalResult llzk::pod::PodType::verifyInvariants ( ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError,
::llvm::ArrayRef<::llzk::pod::RecordAttr > records )
static

Definition at line 78 of file Types.cpp.inc.

Member Data Documentation

◆ dialectName

::llvm::StringLiteral llzk::pod::PodType::dialectName = "pod"
static

Definition at line 67 of file Types.h.inc.

◆ name

::llvm::StringLiteral llzk::pod::PodType::name = "pod.type"
static

Definition at line 66 of file Types.h.inc.


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