LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Ops.td
Go to the documentation of this file.
1//===-- Ops.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_UNDEF_OPS
11#define LLZK_UNDEF_OPS
12
13include "llzk/Dialect/Shared/Types.td"
14include "llzk/Dialect/Undef/IR/Dialect.td"
15
16include "mlir/IR/OpBase.td"
17include "mlir/Interfaces/SideEffectInterfaces.td"
18
19def LLZK_UndefOp : Op<UndefDialect, "undef", [Pure]> {
20 let summary = "Creates an undefined value of the specified type.";
21 let description = [{
22 This operation has no operands or attributes. It represents an undefined
23 value of the specified LLZK IR dialect type. This op can be introduced by
24 the `llzk-array-to-scalar` pass if there is a read from an array index
25 that was not dominated by an earlier write to that same index.
26
27 Example:
28
29 ```llzk
30 %0 = undef.undef : !felt.type
31 ```
32 }];
33 let results = (outs AnyLLZKType:$res);
34 let assemblyFormat = [{
35 `:` type($res) attr-dict
36 }];
37}
38
39#endif // LLZK_UNDEF_OPS