[Mlir-commits] [mlir] [mlir][dataflow] Update dataflow tutorial doc and add dataflow example code (PR #149296)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Thu Aug 28 12:59:07 PDT 2025
https://github.com/ftynse requested changes to this pull request.
Thank you for updating the documentation! I have three major requests:
1. Make sure your lattice is correctly defined, in particular, that it has a separate top/overspecified state and that the join function is a correct supremum.
2. Please move the description of the raw `AnalysisState` API and friends to the _bottom_ of the tutorial and mark it as "advanced implementation details". Most users should use the pre-existing templates instead so they get correct handling of control flow. It will also ensure the notion of lattice is introduced first because it is paramount for the convergence of dataflow analyses.
3. Show at least one example of control flow handling, e.g., a classical diamond (if/else) example with branches.
An optional suggestion is to use the arithmetic dialect with constants and addition instead of string and concatenation, which will simplify the example by avoiding the need to define a whole new dialect.
https://github.com/llvm/llvm-project/pull/149296
More information about the Mlir-commits
mailing list