LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
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
12
#include "
llzk/Dialect/Function/IR/Attrs.h
"
13
#include "
llzk/Dialect/Polymorphic/IR/Ops.h
"
14
#include "
llzk/Dialect/Shared/CallLikeOpInterfaces.h
"
15
#include "
llzk/Dialect/Shared/OpHelpers.h
"
16
#include "
llzk/Dialect/Struct/IR/Ops.h
"
17
#include "
llzk/Dialect/Verif/IR/OpInterfaces.h
"
18
#include "
llzk/Util/Constants.h
"
19
#include "
llzk/Util/SymbolHelper.h
"
20
21
#include <mlir/IR/OpImplementation.h>
22
#include <mlir/Interfaces/CallInterfaces.h>
23
#include <mlir/Interfaces/ControlFlowInterfaces.h>
24
#include <mlir/Interfaces/FunctionInterfaces.h>
25
26
#include <cstdint>
27
#include <optional>
28
29
// Include TableGen'd declarations
30
#define GET_OP_CLASSES
31
#include "
llzk/Dialect/Function/IR/Ops.h.inc
"
32
33
namespace
llzk::function
{
34
36
constexpr
char
ARG_NAME_ATTR_NAME
[] =
"function.arg_name"
;
37
39
constexpr
char
RES_NAME_ATTR_NAME
[] =
"function.res_name"
;
40
42
enum class
FunctionKind
: std::uint8_t {
44
StructCompute
,
46
StructConstrain
,
48
StructProduct
,
50
Free
51
};
52
59
FunctionKind
fnNameToKind
(mlir::StringRef name);
60
61
}
// namespace llzk::function
CallLikeOpInterfaces.h
Attrs.h
Ops.h.inc
OpHelpers.h
Ops.h
Ops.h
SymbolHelper.h
OpInterfaces.h
Constants.h
llzk::function
Definition
Ops.cpp:50
llzk::function::ARG_NAME_ATTR_NAME
constexpr char ARG_NAME_ATTR_NAME[]
Attribute name for source-level function argument names.
Definition
Ops.h:36
llzk::function::RES_NAME_ATTR_NAME
constexpr char RES_NAME_ATTR_NAME[]
Attribute name for source-level function result names.
Definition
Ops.h:39
llzk::function::fnNameToKind
FunctionKind fnNameToKind(mlir::StringRef name)
Given a function name, return the corresponding FunctionKind.
Definition
Ops.cpp:52
llzk::function::FunctionKind
FunctionKind
Kinds of functions in LLZK.
Definition
Ops.h:42
llzk::function::FunctionKind::StructConstrain
@ StructConstrain
Function within a struct named FUNC_NAME_CONSTRAIN.
Definition
Ops.h:46
llzk::function::FunctionKind::StructProduct
@ StructProduct
Function within a struct named FUNC_NAME_PRODUCT.
Definition
Ops.h:48
llzk::function::FunctionKind::StructCompute
@ StructCompute
Function within a struct named FUNC_NAME_COMPUTE.
Definition
Ops.h:44
llzk::function::FunctionKind::Free
@ Free
Function that is not within a struct.
Definition
Ops.h:50
include
llzk
Dialect
Function
IR
Ops.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.