LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches

Defines an index into an LLZK object. More...

#include <SourceRef.h>

Classes

struct  Hash

Public Member Functions

 SourceRefIndex (component::MemberDefOp f)
 SourceRefIndex (SymbolLookupResult< component::MemberDefOp > f)
 SourceRefIndex (mlir::StringAttr recordName)
 SourceRefIndex (const llvm::DynamicAPInt &i)
 SourceRefIndex (int64_t i)
 SourceRefIndex (const llvm::DynamicAPInt &low, const llvm::DynamicAPInt &high)
 Construct a half-open range; a high bound of ShapedType::kDynamic means unbounded.
 SourceRefIndex (IndexRange r)
bool hasUnboundedUpperBound () const
 Whether this range has no finite upper bound.
bool isMember () const
component::MemberDefOp getMember () const
bool isPodRecord () const
mlir::StringAttr getPodRecordNameAttr () const
llvm::StringRef getPodRecordName () const
bool isIndex () const
llvm::DynamicAPInt getIndex () const
bool isIndexRange () const
IndexRange getIndexRange () const
void dump () const
void print (mlir::raw_ostream &os) const
bool operator== (const SourceRefIndex &rhs) const
bool overlaps (const SourceRefIndex &rhs) const
 Return true when these path components select any common storage.
std::strong_ordering operator<=> (const SourceRefIndex &rhs) const
size_t getHash () const

Static Public Member Functions

static SourceRefIndex forArrayDimension (int64_t size)
 Select every nonnegative index in a static or dynamic array dimension.

Detailed Description

Defines an index into an LLZK object.

For structs, this is a member definition, and for arrays, this is an element index. Effectively a wrapper around a std::variant with extra utility methods.

Definition at line 43 of file SourceRef.h.

Constructor & Destructor Documentation

◆ SourceRefIndex() [1/7]

llzk::SourceRefIndex::SourceRefIndex ( component::MemberDefOp f)
inlineexplicit

Definition at line 47 of file SourceRef.h.

◆ SourceRefIndex() [2/7]

llzk::SourceRefIndex::SourceRefIndex ( SymbolLookupResult< component::MemberDefOp > f)
inlineexplicit

Definition at line 48 of file SourceRef.h.

◆ SourceRefIndex() [3/7]

llzk::SourceRefIndex::SourceRefIndex ( mlir::StringAttr recordName)
inlineexplicit

Definition at line 49 of file SourceRef.h.

◆ SourceRefIndex() [4/7]

llzk::SourceRefIndex::SourceRefIndex ( const llvm::DynamicAPInt & i)
inlineexplicit

Definition at line 50 of file SourceRef.h.

◆ SourceRefIndex() [5/7]

llzk::SourceRefIndex::SourceRefIndex ( int64_t i)
inlineexplicit

Definition at line 51 of file SourceRef.h.

◆ SourceRefIndex() [6/7]

llzk::SourceRefIndex::SourceRefIndex ( const llvm::DynamicAPInt & low,
const llvm::DynamicAPInt & high )
inline

Construct a half-open range; a high bound of ShapedType::kDynamic means unbounded.

Definition at line 53 of file SourceRef.h.

◆ SourceRefIndex() [7/7]

llzk::SourceRefIndex::SourceRefIndex ( IndexRange r)
inlineexplicit

Definition at line 55 of file SourceRef.h.

Member Function Documentation

◆ dump()

void llzk::SourceRefIndex::dump ( ) const
inline

Definition at line 94 of file SourceRef.h.

◆ forArrayDimension()

SourceRefIndex llzk::SourceRefIndex::forArrayDimension ( int64_t size)
static

Select every nonnegative index in a static or dynamic array dimension.

Definition at line 100 of file SourceRef.cpp.

◆ getHash()

size_t llzk::SourceRefIndex::getHash ( ) const
inline

Definition at line 119 of file SourceRef.h.

◆ getIndex()

llvm::DynamicAPInt llzk::SourceRefIndex::getIndex ( ) const
inline

Definition at line 83 of file SourceRef.h.

◆ getIndexRange()

IndexRange llzk::SourceRefIndex::getIndexRange ( ) const
inline

Definition at line 89 of file SourceRef.h.

◆ getMember()

component::MemberDefOp llzk::SourceRefIndex::getMember ( ) const
inline

Definition at line 67 of file SourceRef.h.

◆ getPodRecordName()

llvm::StringRef llzk::SourceRefIndex::getPodRecordName ( ) const
inline

Definition at line 80 of file SourceRef.h.

◆ getPodRecordNameAttr()

mlir::StringAttr llzk::SourceRefIndex::getPodRecordNameAttr ( ) const
inline

Definition at line 76 of file SourceRef.h.

◆ hasUnboundedUpperBound()

bool llzk::SourceRefIndex::hasUnboundedUpperBound ( ) const

Whether this range has no finite upper bound.

Definition at line 105 of file SourceRef.cpp.

◆ isIndex()

bool llzk::SourceRefIndex::isIndex ( ) const
inline

Definition at line 82 of file SourceRef.h.

◆ isIndexRange()

bool llzk::SourceRefIndex::isIndexRange ( ) const
inline

Definition at line 88 of file SourceRef.h.

◆ isMember()

bool llzk::SourceRefIndex::isMember ( ) const
inline

Definition at line 63 of file SourceRef.h.

◆ isPodRecord()

bool llzk::SourceRefIndex::isPodRecord ( ) const
inline

Definition at line 75 of file SourceRef.h.

◆ operator<=>()

std::strong_ordering llzk::SourceRefIndex::operator<=> ( const SourceRefIndex & rhs) const

Definition at line 126 of file SourceRef.cpp.

◆ operator==()

bool llzk::SourceRefIndex::operator== ( const SourceRefIndex & rhs) const
inline

Definition at line 97 of file SourceRef.h.

◆ overlaps()

bool llzk::SourceRefIndex::overlaps ( const SourceRefIndex & rhs) const

Return true when these path components select any common storage.

Index ranges are half-open.

Definition at line 182 of file SourceRef.cpp.

◆ print()

void llzk::SourceRefIndex::print ( mlir::raw_ostream & os) const

Definition at line 109 of file SourceRef.cpp.


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