LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
TransformationPasses.td
Go to the documentation of this file.
1//===-- TransformationPasses.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_POLYMORPHIC_TRANSFORMATION_PASSES_TD
11#define LLZK_POLYMORPHIC_TRANSFORMATION_PASSES_TD
12
13include "llzk/Pass/PassBase.td"
14
15def EmptyParamListRemovalPass : LLZKPass<"llzk-drop-empty-params"> {
16 let summary = "Remove empty struct parameter lists";
17 let constructor = "llzk::polymorphic::createEmptyParamListRemoval()";
18}
19
20def FlatteningPass : LLZKPass<"llzk-flatten"> {
21 let summary = "Flatten structs and unroll loops";
22 let description = [{
23 Performs the following transformations:
24 - Instantiate `affine_map` parameters of StructType and ArrayType
25 to constant values using the arguments at the instantiation site
26 - Replace parameterized structs with flattened (i.e. no parameter)
27 versions of those structs based on requested return type at calls
28 to `compute()` functions and unroll loops
29 - Unroll loops
30 }];
31 let constructor = "llzk::polymorphic::createFlatteningPass()";
32}
33
34#endif // LLZK_POLYMORPHIC_TRANSFORMATION_PASSES_TD