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

Common private implementation for poly dialect passes. More...

#include "llzk/Analysis/SymbolDefTree.h"
#include "llzk/Analysis/SymbolUseGraph.h"
#include "llzk/Dialect/Array/IR/Ops.h"
#include "llzk/Dialect/Constrain/IR/Ops.h"
#include "llzk/Dialect/Function/IR/Ops.h"
#include "llzk/Dialect/Global/IR/Ops.h"
#include "llzk/Dialect/LLZK/IR/AttributeHelper.h"
#include "llzk/Dialect/Polymorphic/IR/Ops.h"
#include "llzk/Dialect/Shared/TypeConversionPatterns.h"
#include "llzk/Dialect/Struct/IR/Ops.h"
#include "llzk/Util/TypeHelper.h"
#include <mlir/Dialect/Arith/IR/Arith.h>
#include <mlir/Dialect/SCF/IR/SCF.h>
#include <mlir/Dialect/SCF/Transforms/Patterns.h>
#include <mlir/IR/Attributes.h>
#include <mlir/IR/BuiltinAttributes.h>
#include <mlir/IR/MLIRContext.h>
#include <mlir/IR/Operation.h>
#include <mlir/IR/PatternMatch.h>
#include <mlir/IR/SymbolTable.h>
#include <mlir/Transforms/DialectConversion.h>
#include <llvm/ADT/DenseMap.h>
#include <llvm/ADT/DenseSet.h>
#include <llvm/ADT/STLExtras.h>
#include <llvm/ADT/SmallVector.h>
#include <llvm/Support/Debug.h>
Include dependency graph for SharedImpl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llzk::polymorphic::detail::CleanupBase
 Shared state for post-instantiation cleanup helpers. More...
class  llzk::polymorphic::detail::FromEraseSet
 Removes parameterized definitions whose instantiated replacements now cover every remaining use. More...
struct  llzk::polymorphic::detail::InstantiationLayout
 Groups the information needed after concrete parameters have been chosen to decide how to name a new instantiated template and how to rewrite the remaining argument list at the use site. More...
class  llzk::polymorphic::detail::LegalityCheckCallback
class  llzk::polymorphic::detail::EmptyLegalityCheckCallback

Namespaces

namespace  llzk
namespace  llzk::polymorphic
namespace  llzk::polymorphic::detail

Macros

#define DEBUG_TYPE   "poly-dialect-shared"

Functions

mlir::ConversionTarget llzk::polymorphic::detail::newBaseTarget (mlir::MLIRContext *ctx)
 Return a new ConversionTarget allowing all LLZK-required dialects.
bool llzk::polymorphic::detail::isErasableDefinition (mlir::Operation *op)
 Return true iff op is a cleanup candidate.
array::ArrayType llzk::polymorphic::detail::flattenInstantiatedArrayType (array::ArrayType inputTy, mlir::Type convertedElemTy)
 Merge nested array dimensions produced by replacing an array element type.
component::StructType llzk::polymorphic::detail::getStructTypeWithParams (mlir::SymbolRefAttr nameRef, mlir::ArrayAttr params)
 Build a struct type while representing an empty parameter list as absent.
component::StructType llzk::polymorphic::detail::getStructTypeWithParams (mlir::SymbolRefAttr nameRef, mlir::MLIRContext *ctx, mlir::ArrayRef< mlir::Attribute > params)
 Build a struct type while representing an empty parameter list as absent.
InstantiationLayout llzk::polymorphic::detail::buildInstantiationLayout (TemplateOp parentTemplate, mlir::ArrayAttr callParams, const llvm::DenseMap< mlir::Attribute, mlir::Attribute > &paramNameToConcrete)
 Derive the instantiated template name and the remaining explicit parameters that should stay on the rewritten use site.
template<typename... AdditionalOpClasses, typename... AdditionalChecks>
mlir::ConversionTarget llzk::polymorphic::detail::newConverterDefinedTarget (mlir::TypeConverter &tyConv, mlir::MLIRContext *ctx, AdditionalChecks &&...checks)
 Return a new ConversionTarget allowing all LLZK-required dialects and defining Op legality based on the given TypeConverter for Ops listed in both members of OpClassesWithStructTypes and in AdditionalOpClasses.
template<typename... AdditionalOpClasses, typename... AdditionalChecks>
mlir::ConversionTarget llzk::polymorphic::detail::newConverterDefinedTargetWithCallback (mlir::TypeConverter &tyConv, mlir::MLIRContext *ctx, LegalityCheckCallback &cb, AdditionalChecks &&...checks)
 Return a new ConversionTarget allowing all LLZK-required dialects and defining Op legality based on the given TypeConverter for Ops listed in both members of OpClassesWithStructTypes and in AdditionalOpClasses.

Detailed Description

Common private implementation for poly dialect passes.

Definition in file SharedImpl.h.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "poly-dialect-shared"

Definition at line 46 of file SharedImpl.h.