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 - Polymorphic 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 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9
11
15
16#include <mlir/IR/Builders.h>
17#include <mlir/IR/DialectImplementation.h>
18
19#include <llvm/ADT/TypeSwitch.h>
20
21// TableGen'd implementation files
23
24#define GET_TYPEDEF_CLASSES
26
27//===------------------------------------------------------------------===//
28// PolymorphicDialect
29//===------------------------------------------------------------------===//
30
31auto llzk::polymorphic::PolymorphicDialect::initialize() -> void {
32 // clang-format off
33 addOperations<
34 #define GET_OP_LIST
36 >();
37
38 // Suppress false positive from `clang-tidy`
39 // NOLINTNEXTLINE(clang-analyzer-core.StackAddressEscape)
40 addTypes<
41 #define GET_TYPEDEF_LIST
43 >();
44 // clang-format on
45 addInterfaces<LLZKDialectBytecodeInterface<PolymorphicDialect>>();
46}