[Mlir-commits] [mlir] [mlir] NFC: void visitRegionSuccessors (PR #125268)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 31 10:58:18 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

<details>
<summary>Changes</summary>

I would like to hook/override `visitRegionSuccessors` in sparse analyses that inherit from  `AbstractSparseForwardDataFlowAnalysis`. This would allow me to control specifically how regions are analyzed (e.g., number of visits).

---
Full diff: https://github.com/llvm/llvm-project/pull/125268.diff


1 Files Affected:

- (modified) mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h (+1-1) 


``````````diff
diff --git a/mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h b/mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
index 387b9ee707179bf..8c67c9dd75de598 100644
--- a/mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
+++ b/mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
@@ -255,7 +255,7 @@ class AbstractSparseForwardDataFlowAnalysis : public DataFlowAnalysis {
   /// operation `branch`, which can either be the entry block of one of the
   /// regions or the parent operation itself, and set either the argument or
   /// parent result lattices.
-  void visitRegionSuccessors(ProgramPoint *point,
+  virtual void visitRegionSuccessors(ProgramPoint *point,
                              RegionBranchOpInterface branch,
                              RegionBranchPoint successor,
                              ArrayRef<AbstractSparseLattice *> lattices);

``````````

</details>


https://github.com/llvm/llvm-project/pull/125268


More information about the Mlir-commits mailing list