LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
Loading...
Searching...
No Matches
StructSpecialization.h
Go to the documentation of this file.
1
//===-- StructSpecialization.h ----------------------------------*- C++ -*-===//
2
//
3
// Part of the LLZK Project, under the Apache License v2.0.
4
// See LICENSE.txt for license information.
5
// Copyright 2026 Project LLZK
6
// SPDX-License-Identifier: Apache-2.0
7
//
8
//===----------------------------------------------------------------------===//
9
10
#pragma once
11
12
#include "
llzk/Dialect/Struct/IR/Ops.h
"
13
14
#include <mlir/IR/BuiltinOps.h>
15
#include <mlir/IR/SymbolTable.h>
16
17
#include <llvm/ADT/DenseMap.h>
18
#include <llvm/ADT/SmallVector.h>
19
20
#include <optional>
21
22
namespace
llzk::polymorphic
{
23
28
class
StructSpecializationResolver
{
30
mlir::ModuleOp rootModule;
32
std::optional<llvm::DenseMap<int64_t, llvm::SmallVector<component::StructDefOp, 1>>> definitions;
33
34
public
:
35
explicit
StructSpecializationResolver
(mlir::ModuleOp module) : rootModule(module) {}
36
39
mlir::FailureOr<component::StructDefOp>
resolve
(
40
mlir::SymbolTableCollection &tables,
component::StructType
type, int64_t
id
,
41
mlir::Operation *site, mlir::StringRef diagnosticContext
42
);
43
};
44
45
}
// namespace llzk::polymorphic
Ops.h
llzk::component::StructType
Definition
Types.h.inc:52
llzk::polymorphic::StructSpecializationResolver::resolve
mlir::FailureOr< component::StructDefOp > resolve(mlir::SymbolTableCollection &tables, component::StructType type, int64_t id, mlir::Operation *site, mlir::StringRef diagnosticContext)
Resolve an ID and validate its source.
Definition
StructSpecialization.cpp:20
llzk::polymorphic::StructSpecializationResolver::StructSpecializationResolver
StructSpecializationResolver(mlir::ModuleOp module)
Definition
StructSpecialization.h:35
llzk::polymorphic
Definition
Ops.cpp:32
include
llzk
Dialect
Polymorphic
Util
StructSpecialization.h
Generated by
1.17.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.