LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h
Go to the documentation of this file.
1//===-- Ops.h ---------------------------------------------------*- 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
10#pragma once
11
15
16#include <mlir/Dialect/Affine/IR/AffineValueMap.h>
17#include <mlir/Interfaces/ControlFlowInterfaces.h>
18#include <mlir/Interfaces/InferTypeOpInterface.h>
19
20#include <llvm/ADT/StringRef.h>
21
22// Include TableGen'd declarations
24
25namespace llzk::polymorphic {
26
34inline constexpr llvm::StringLiteral TEMPLATE_NAME_PATTERN_ATTR = "poly.name_pattern";
35
36template <typename OpT>
38 std::is_same_v<OpT, TemplateSymbolBindingOpInterface> ||
39 std::is_base_of_v<TemplateSymbolBindingOpInterface::Trait<OpT>, OpT>;
40} // namespace llzk::polymorphic
41
42// Include TableGen'd declarations
43#define GET_OP_CLASSES
45
46namespace llzk::polymorphic {
47
49bool isInTemplate(mlir::Operation *op);
50
53mlir::FailureOr<TemplateOp> verifyInTemplate(mlir::Operation *op);
54
55} // namespace llzk::polymorphic
constexpr llvm::StringLiteral TEMPLATE_NAME_PATTERN_ATTR
Metadata carried across transformation passes preserving the literal chunks of a partially-instantiat...
Definition Ops.h:34
bool isInTemplate(Operation *op)
Definition Ops.cpp:34
FailureOr< TemplateOp > verifyInTemplate(Operation *op)
Definition Ops.cpp:36