LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
OpInterfaces.td
Go to the documentation of this file.
1//===-- OpInterfaces.td ------------------------------------*- tablegen -*-===//
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#ifndef LLZK_FELT_OP_INTERFACES
11#define LLZK_FELT_OP_INTERFACES
12
13include "llzk/Dialect/Felt/IR/Types.td"
14
15include "mlir/IR/Interfaces.td"
16include "mlir/Interfaces/SideEffectInterfaces.td"
17include "mlir/Interfaces/MemorySlotInterfaces.td"
18
19def FeltBinaryOpInterface : OpInterface<"FeltBinaryOpInterface"> {
20 let description = [{
21 Common interface for binary arithmetic operations on felts
22 }];
23
24 let cppNamespace = "::llzk::felt";
25
26 let methods = [
27 // Requires implementors to have '$lhs' and '$rhs' arguments.
28 InterfaceMethod<[{Gets the left operand.}], "::mlir::Value", "getLhs",
29 (ins)>,
30 InterfaceMethod<[{Gets the right operand.}], "::mlir::Value", "getRhs",
31 (ins)>];
32}
33
34#endif // LLZK_FELT_OP_INTERFACES