LLZK 0.1.0
Veridise's ZK Language IR
|
llzk-opt
is a version of the mlir-opt
tool that supports passes on LLZK IR files. You can refer to the mlir-opt
documentation for a general overview of the operation of *-opt
tooling, but note that many options and passes available in mlir-opt
are not available in llzk-opt
. llzk-opt -h
will show a list of all available flags and options.
-llzk-print-call-graph
Print the LLZK module's call graph.
-llzk-print-call-graph-sccs
Print the SCCs from the LLZK module's call graph.
-llzk-print-constraint-dependency-graphs
Print constraint dependency graph for all LLZK structs.
-llzk-print-interval-analysis
Print interval analysis results for all LLZK structs.
-llzk-duplicate-op-elim
Remove redundant operations
Remove llzk and arith dialect operations that produce the same results as previously executed operations.
Pass should be run after llzk-duplicate-read-write-elim for maximum effect.
-llzk-duplicate-read-write-elim
Remove redundant reads and writes
Remove read and write operations to struct fields and arrays that are redundant or unnecessary.
-llzk-poly-lowering-pass
Lowers the degree of all polynomial equations to a specified maximum
Rewrites constraint expressions into an (observationally) equivalent system where the degree of every polynomial is less than or equal to the specified maximum.
This pass is best used as part of the -llzk-full-poly-lowering
pipeline, which includes additional cleanup passes to ensure correctness and optimal performance.
-llzk-unused-declaration-elim
Remove unused field and struct declarations
Remove field and struct declarations that are unused within the current compilation unit. Note that this pass may cause linking issues with external modules that depend on any unused field and struct declarations from this compilation unit.
Pass should be run after llzk-duplicate-read-write-elim and llzk-duplicate-op-elim for maximum effect.
-llzk-array-to-scalar
Replace arrays with scalar values
Replace known-shape arrays with the proper number of scalar values
-llzk-drop-empty-params
Remove empty struct parameter lists
-llzk-flatten
Flatten structs and unroll loops
Performs the following transformations:
affine_map
parameters of StructType and ArrayType to constant values using the arguments at the instantiation sitecompute()
functions and unroll loops-llzk-validate-field-writes
Detect multiple and missing writes to the same field of a component.
cmake --build <build dir> --target llzk-lsp-server
will produce an LLZK-specific LSP server that can be used in an IDE to provide language information for LLZK. Refer to the MLIR LSP documentation for a more detailed explanation of the MLIR LSP tools and how to set them up in your IDE.