LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::LLZKDialectBytecodeInterface< DialectTy > Struct Template Reference

This implements the bytecode interface for the LLZK dialect. More...

#include <Versioning.h>

Inheritance diagram for llzk::LLZKDialectBytecodeInterface< DialectTy >:
[legend]
Collaboration diagram for llzk::LLZKDialectBytecodeInterface< DialectTy >:
[legend]

Public Member Functions

 LLZKDialectBytecodeInterface (mlir::Dialect *dia)
void writeVersion (mlir::DialectBytecodeWriter &writer) const override
 Writes the current version of the LLZK-lib to the given writer.
std::unique_ptr< mlir::DialectVersion > readVersion (mlir::DialectBytecodeReader &reader) const override
 Read the version of this dialect from the provided reader and return it as a unique_ptr to a dialect version object (or nullptr on failure).
mlir::LogicalResult upgradeFromVersion (mlir::Operation *rootOp, const mlir::DialectVersion &version) const final
 Hook invoked for each custom dialect after parsing is completed if a version directive was present and included an entry for the current dialect.
virtual mlir::LogicalResult upgradeFromVersion (mlir::Operation *rootOp, const LLZKDialectVersion &current, const LLZKDialectVersion &requested) const

Detailed Description

template<typename DialectTy>
struct llzk::LLZKDialectBytecodeInterface< DialectTy >

This implements the bytecode interface for the LLZK dialect.

Definition at line 40 of file Versioning.h.

Constructor & Destructor Documentation

◆ LLZKDialectBytecodeInterface()

template<typename DialectTy>
llzk::LLZKDialectBytecodeInterface< DialectTy >::LLZKDialectBytecodeInterface ( mlir::Dialect * dia)
inline

Definition at line 42 of file Versioning.h.

Member Function Documentation

◆ readVersion()

template<typename DialectTy>
std::unique_ptr< mlir::DialectVersion > llzk::LLZKDialectBytecodeInterface< DialectTy >::readVersion ( mlir::DialectBytecodeReader & reader) const
inlineoverride

Read the version of this dialect from the provided reader and return it as a unique_ptr to a dialect version object (or nullptr on failure).

Definition at line 59 of file Versioning.h.

◆ upgradeFromVersion() [1/2]

template<typename DialectTy>
virtual mlir::LogicalResult llzk::LLZKDialectBytecodeInterface< DialectTy >::upgradeFromVersion ( mlir::Operation * rootOp,
const LLZKDialectVersion & current,
const LLZKDialectVersion & requested ) const
inlinevirtual

Definition at line 87 of file Versioning.h.

◆ upgradeFromVersion() [2/2]

template<typename DialectTy>
mlir::LogicalResult llzk::LLZKDialectBytecodeInterface< DialectTy >::upgradeFromVersion ( mlir::Operation * rootOp,
const mlir::DialectVersion & version ) const
inlinefinal

Hook invoked for each custom dialect after parsing is completed if a version directive was present and included an entry for the current dialect.

This hook offers the opportunity for the dialect to visit the IR and upgrade constructs emitted by the provided version of the dialect to the current version.

Definition at line 72 of file Versioning.h.

◆ writeVersion()

template<typename DialectTy>
void llzk::LLZKDialectBytecodeInterface< DialectTy >::writeVersion ( mlir::DialectBytecodeWriter & writer) const
inlineoverride

Writes the current version of the LLZK-lib to the given writer.

Definition at line 45 of file Versioning.h.


The documentation for this struct was generated from the following file: