[Mlir-commits] [flang] [mlir] [mlir][Analysis] Add dependency declaration for dataflow analyses (PR #193112)
Ivan Butygin
llvmlistbot at llvm.org
Wed Apr 22 04:19:26 PDT 2026
================
@@ -28,6 +28,52 @@
namespace mlir {
+class DataFlowAnalysis;
+
+//===----------------------------------------------------------------------===//
+// AnalysisDependencies
+//===----------------------------------------------------------------------===//
+
+/// Helper used by `DataFlowAnalysis::getDependentAnalyses` to declare the
+/// analyses that must be loaded into the solver for an analysis to run
+/// correctly. Declared analyses are not auto-loaded by the solver; callers
+/// are expected to load them explicitly with the appropriate constructor
+/// arguments. `DataFlowSolver::initializeAndRun` fails with a diagnostic if
+/// any declared dependency is missing.
----------------
Hardcode84 wrote:
See my other comments about the analyses arguments, we could potentially add `insertAndLoad` which intentionally doesn't take any arguments for things like `DeadCodeAnalysis` but it can still blow up if we have an analysis with default args and it's loaded both via `insertAndLoad` and the normal way.
https://github.com/llvm/llvm-project/pull/193112
More information about the Mlir-commits
mailing list