[all-commits] [llvm/llvm-project] 6a6667: [mlir][dataflow] Unify dependency management in An...
Zhixun Tan via All-commits
all-commits at lists.llvm.org
Mon Jul 3 12:21:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6a66673765b2bf45f412ab4261a72704805dd526
https://github.com/llvm/llvm-project/commit/6a66673765b2bf45f412ab4261a72704805dd526
Author: Zhixun Tan <phisiart at gmail.com>
Date: 2023-07-03 (Mon, 03 Jul 2023)
Changed paths:
M mlir/include/mlir/Analysis/DataFlowFramework.h
M mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
M mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
M mlir/lib/Analysis/DataFlowFramework.cpp
Log Message:
-----------
[mlir][dataflow] Unify dependency management in AnalysisState.
In the MLIR dataflow analysis framework, when an `AnalysisState` is updated, it's dependents are enqueued to be visited.
Currently, there are two ways dependents are managed:
* `AnalysisState::dependents` stores a list of dependents. `DataFlowSolver::propagateIfChanged()` reads this list and enqueues them to the worklist.
* `AnalysisState::onUpdate()` allows custom logic to enqueue more to the worklist. This is called by `DataFlowSolver::propagateIfChanged()`.
This cleanup diff consolidates the two into `AnalysisState::onUpdate()`. This way, `DataFlowSolver` does not need to know the detail about `AnalysisState::dependents`, and the logic of dependency management is entirely handled by `AnalysisState`.
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D154170
More information about the All-commits
mailing list