File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
mlir/include/mlir/Analysis Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,10 @@ class DataFlowConfig {
308308// / according to their dependency relations until a fixed point is reached.
309309// / 3. Query analysis state results from the solver.
310310// /
311+ // / Steps to re-run a data-flow analysis when IR changes:
312+ // / 1. Erase all analysis states as they are no longer valid.
313+ // / 2. Re-run the analysis using `initializeAndRun`.
314+ // /
311315// / TODO: Optimize the internal implementation of the solver.
312316class DataFlowSolver {
313317public:
@@ -346,6 +350,9 @@ class DataFlowSolver {
346350 }
347351 }
348352
353+ // Erase all analysis states
354+ void eraseAllStates () { analysisStates.clear (); }
355+
349356 // / Get a uniqued lattice anchor instance. If one is not present, it is
350357 // / created with the provided arguments.
351358 template <typename AnchorT, typename ... Args>
You can’t perform that action at this time.
0 commit comments