LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::polymorphic::detail::DiscoveryStorage Class Reference

Track only local constant aggregate contents. More...

#include <DiscoveryStorage.h>

Public Member Functions

 DiscoveryStorage (mlir::MLIRContext *context)
DiscoveryValue create ()
 Allocate an aggregate with no known leaves.
void invalidate ()
 Drop memory facts at an unknown control-flow or call boundary.
void forget (const DiscoveryValue &value)
 Forget the contents of a potentially modified or escaping local aggregate.
DiscoveryValue read (const DiscoveryValue &source, llvm::ArrayRef< mlir::Attribute > path, bool aggregate)
 Read a scalar leaf or snapshot an aggregate subtree into an independent root.
void setShape (const DiscoveryValue &value, llvm::ArrayRef< int64_t > shape, llvm::ArrayRef< mlir::Attribute > path={})
 Record dimensions at an array root or a nested POD record path.
llvm::ArrayRef< int64_t > getShape (const DiscoveryValue &value)
 Return concrete root dimensions when available, including after value copies.
void write (const DiscoveryValue &destination, llvm::ArrayRef< mlir::Attribute > path, const DiscoveryValue &value)
 Replace a subtree, clearing old facts even when the new value is unknown.

Detailed Description

Track only local constant aggregate contents.

Reads and assignments copy values; loop arguments retain identity. Unknown control flow or escaping storage invalidates facts instead of guessing memory effects.

Definition at line 51 of file DiscoveryStorage.h.

Constructor & Destructor Documentation

◆ DiscoveryStorage()

llzk::polymorphic::detail::DiscoveryStorage::DiscoveryStorage ( mlir::MLIRContext * context)
inlineexplicit

Definition at line 64 of file DiscoveryStorage.h.

Member Function Documentation

◆ create()

DiscoveryValue llzk::polymorphic::detail::DiscoveryStorage::create ( )
inline

Allocate an aggregate with no known leaves.

Definition at line 67 of file DiscoveryStorage.h.

◆ forget()

void llzk::polymorphic::detail::DiscoveryStorage::forget ( const DiscoveryValue & value)
inline

Forget the contents of a potentially modified or escaping local aggregate.

Definition at line 91 of file DiscoveryStorage.h.

◆ getShape()

llvm::ArrayRef< int64_t > llzk::polymorphic::detail::DiscoveryStorage::getShape ( const DiscoveryValue & value)
inline

Return concrete root dimensions when available, including after value copies.

Definition at line 143 of file DiscoveryStorage.h.

◆ invalidate()

void llzk::polymorphic::detail::DiscoveryStorage::invalidate ( )
inline

Drop memory facts at an unknown control-flow or call boundary.

Scalar SSA constants already read from storage remain immutable and need no invalidation.

Definition at line 80 of file DiscoveryStorage.h.

◆ read()

DiscoveryValue llzk::polymorphic::detail::DiscoveryStorage::read ( const DiscoveryValue & source,
llvm::ArrayRef< mlir::Attribute > path,
bool aggregate )
inline

Read a scalar leaf or snapshot an aggregate subtree into an independent root.

Definition at line 102 of file DiscoveryStorage.h.

◆ setShape()

void llzk::polymorphic::detail::DiscoveryStorage::setShape ( const DiscoveryValue & value,
llvm::ArrayRef< int64_t > shape,
llvm::ArrayRef< mlir::Attribute > path = {} )
inline

Record dimensions at an array root or a nested POD record path.

Definition at line 135 of file DiscoveryStorage.h.

◆ write()

void llzk::polymorphic::detail::DiscoveryStorage::write ( const DiscoveryValue & destination,
llvm::ArrayRef< mlir::Attribute > path,
const DiscoveryValue & value )
inline

Replace a subtree, clearing old facts even when the new value is unknown.

Definition at line 154 of file DiscoveryStorage.h.


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