[Mlir-commits] [mlir] [MLIR][Affine] Check dependences during MDG init (PR #156422)

Uday Bondhugula llvmlistbot at llvm.org
Wed Sep 3 23:23:54 PDT 2025


================
@@ -153,9 +153,17 @@ struct MemRefDependenceGraph {
 
   MemRefDependenceGraph(Block &block) : block(block) {}
 
-  // Initializes the dependence graph based on operations in `block'.
-  // Returns true on success, false otherwise.
-  bool init();
+  // Initializes the data dependence graph by walking operations in the MDG's
+  // `block`. A `Node` is created for every top-level op except for
+  // side-effect-free operations with zero results and no regions. Assigns each
+  // node in the graph a node id based on the order in block. Fails if certain
----------------
bondhugula wrote:

It is not a recursive walk - it just iterates over the top-level ops (immediately) in the block. So pre-order/post-order is not applicable.

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


More information about the Mlir-commits mailing list