LLZK 0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
TypeHelper.cpp File Reference
#include "llzk/Dialect/Array/IR/Types.h"
#include "llzk/Dialect/Felt/IR/Types.h"
#include "llzk/Dialect/LLZK/IR/AttributeHelper.h"
#include "llzk/Dialect/POD/IR/Attrs.h"
#include "llzk/Dialect/POD/IR/Types.h"
#include "llzk/Dialect/Polymorphic/IR/Types.h"
#include "llzk/Dialect/String/IR/Types.h"
#include "llzk/Dialect/Struct/IR/Types.h"
#include "llzk/Util/Debug.h"
#include "llzk/Util/StreamHelper.h"
#include "llzk/Util/SymbolHelper.h"
#include "llzk/Util/TypeHelper.h"
#include <llvm/ADT/STLExtras.h>
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/TypeSwitch.h>
#include <llvm/Support/Debug.h>
#include <cstdint>
#include <numeric>
Include dependency graph for TypeHelper.cpp:

Go to the source code of this file.

Classes

struct  llzk::LLZKTypeSwitch< Derived, ResultType >
 Template pattern for performing some operation by cases based on a given LLZK type. More...

Namespaces

namespace  llzk

Macros

#define DEBUG_TYPE   "llzk-type-helpers"

Functions

bool llzk::isValidType (Type type)
bool llzk::isValidColumnType (Type type, SymbolTableCollection &symbolTable, Operation *op)
bool llzk::isValidGlobalType (Type type)
bool llzk::isValidEmitEqType (Type type)
bool llzk::isValidConstReadType (Type type)
bool llzk::isValidArrayElemType (Type type)
bool llzk::isValidArrayType (Type type)
bool llzk::isConcreteType (Type type, bool allowStructParams)
bool llzk::hasAffineMapAttr (Type type)
bool llzk::isDynamic (IntegerAttr intAttr)
uint64_t llzk::computeEmitEqCardinality (Type type)
bool llzk::typeParamsUnify (const ArrayRef< Attribute > &lhsParams, const ArrayRef< Attribute > &rhsParams, UnificationMap *unifications)
bool llzk::typeParamsUnify (const ArrayAttr &lhsParams, const ArrayAttr &rhsParams, UnificationMap *unifications)
 Return true iff the two ArrayAttr instances containing StructType or ArrayType parameters are equivalent or could be equivalent after full instantiation of struct parameters.
bool llzk::arrayTypesUnify (ArrayType lhs, ArrayType rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)
bool llzk::structTypesUnify (StructType lhs, StructType rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)
bool llzk::typesUnify (Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)
bool llzk::isMoreConcreteUnification (Type oldTy, Type newTy, llvm::function_ref< bool(Type oldTy, Type newTy)> knownOldToNew)
FailureOr< IntegerAttr > llzk::forceIntType (IntegerAttr attr, EmitErrorFn emitError)
FailureOr< Attribute > llzk::forceIntAttrType (Attribute attr, EmitErrorFn emitError)
FailureOr< SmallVector< Attribute > > llzk::forceIntAttrTypes (ArrayRef< Attribute > attrList, EmitErrorFn emitError)
LogicalResult llzk::verifyIntAttrType (EmitErrorFn emitError, Attribute in)
LogicalResult llzk::verifyAffineMapAttrType (EmitErrorFn emitError, Attribute in)
LogicalResult llzk::verifyStructTypeParams (EmitErrorFn emitError, ArrayAttr params)
LogicalResult llzk::verifyArrayDimSizes (EmitErrorFn emitError, ArrayRef< Attribute > dimensionSizes)
LogicalResult llzk::verifyArrayType (EmitErrorFn emitError, Type elementType, ArrayRef< Attribute > dimensionSizes)
void llzk::assertValidAttrForParamOfType (Attribute attr)
LogicalResult llzk::verifySubArrayType (EmitErrorFn emitError, array::ArrayType arrayType, array::ArrayType subArrayType)
 Determine if the subArrayType is a valid subarray of arrayType.
LogicalResult llzk::verifySubArrayOrElementType (EmitErrorFn emitError, ArrayType arrayType, Type subArrayOrElemType)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "llzk-type-helpers"

Definition at line 31 of file TypeHelper.cpp.