LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Dialect.cpp
Go to the documentation of this file.
1//===-- Dialect.cpp - POD dialect implementation ----------------*- 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
11
16
17#include <mlir/IR/Builders.h>
18#include <mlir/IR/DialectImplementation.h>
19
20#include <llvm/ADT/TypeSwitch.h>
21
22// TableGen'd implementation files
24
25#define GET_TYPEDEF_CLASSES
27
28// Need a complete declaration of storage classes for below
29#define GET_ATTRDEF_CLASSES
31
32//===------------------------------------------------------------------===//
33// ArrayDialect
34//===------------------------------------------------------------------===//
35
36auto llzk::pod::PODDialect::initialize() -> void {
37 // clang-format off
38 addOperations<
39 #define GET_OP_LIST
41 >();
42
43 // Suppress false positive from `clang-tidy`
44 // NOLINTNEXTLINE(clang-analyzer-core.StackAddressEscape)
45 addTypes<
46 #define GET_TYPEDEF_LIST
48 >();
49
50 // Suppress false positive from `clang-tidy`
51 // NOLINTNEXTLINE(clang-analyzer-core.StackAddressEscape)
52 addAttributes<
53 #define GET_ATTRDEF_LIST
55 >();
56
57 // clang-format on
58 addInterfaces<LLZKDialectBytecodeInterface<PODDialect>>();
59}