|
LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
|
This file identifies scf.while loops that can be converted to scf.for loops and performs the conversion. More...
#include "llzk/Dialect/Bool/IR/Ops.h"#include "llzk/Dialect/Cast/IR/Dialect.h"#include "llzk/Dialect/Cast/IR/Ops.h"#include "llzk/Dialect/Felt/IR/Ops.h"#include "llzk/Dialect/LLZK/IR/Attrs.h"#include "llzk/Transforms/LLZKTransformationPasses.h"#include <llvm/Support/Debug.h>#include <algorithm>#include "llzk/Transforms/LLZKTransformationPasses.h.inc"Go to the source code of this file.
Classes | |
| class | llzk::impl::WhileToForPassBase< DerivedT > |
Namespaces | |
| namespace | llzk |
| namespace | llzk::impl |
Macros | |
| #define | GEN_PASS_DEF_WHILETOFORPASS |
| #define | DEBUG_TYPE "while-to-for" |
Functions | |
| std::unique_ptr<::mlir::Pass > | llzk::impl::createWhileToForPass () |
| std::unique_ptr<::mlir::Pass > | llzk::createWhileToForPass () |
This file identifies scf.while loops that can be converted to scf.for loops and performs the conversion.
A while loop can be converted if:
This pass begins by identifying the induction variable, lower and upper bounds, and step (ForOp::parseInfo), then materializes a for loop with these parameters and copies the before and after blocks into the body, drops the yielded induction variable, and remaps uses of the other yielded values (transformWhileToFor).
Definition in file LLZKWhileToForPass.cpp.
| #define DEBUG_TYPE "while-to-for" |
Definition at line 42 of file LLZKWhileToForPass.cpp.
| #define GEN_PASS_DEF_WHILETOFORPASS |
Definition at line 38 of file LLZKWhileToForPass.cpp.