[mlir] Add a generic data-flow analysis framework
authorMogball <jeffniu22@gmail.com>
Mon, 13 Jun 2022 21:54:52 +0000 (21:54 +0000)
committerMogball <jeffniu22@gmail.com>
Tue, 14 Jun 2022 16:54:15 +0000 (16:54 +0000)
commit9dea11728340e54e1fde76320b61a559148c8a3e
tree63374743d2cff8111aacdf760c5f9394c6e68548
parent3b54aa9eab823f8edc8eaae4fba8e6f646ff5f91
[mlir] Add a generic data-flow analysis framework

This patch introduces a generic data-flow analysis framework to MLIR. The framework implements a fixed-point iteration algorithm and a dependency graph between lattice states and analysis. Lattice states and points are fully extensible to support highly-customizable analyses.

Reviewed By: phisiart, rriddle

Differential Revision: https://reviews.llvm.org/D126751
mlir/include/mlir/Analysis/DataFlowFramework.h [new file with mode: 0644]
mlir/lib/Analysis/CMakeLists.txt
mlir/lib/Analysis/DataFlowFramework.cpp [new file with mode: 0644]
mlir/test/Analysis/test-foo-analysis.mlir [new file with mode: 0644]
mlir/test/lib/Analysis/CMakeLists.txt
mlir/test/lib/Analysis/TestDataFlowFramework.cpp [new file with mode: 0644]
mlir/tools/mlir-opt/mlir-opt.cpp
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel