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.
Please spell out this auto. The MLIR guidelines for using auto are that: