[Mlir-commits] [mlir] [MLIR][Affine] Check dependences during MDG init (PR #156422)
Uday Bondhugula
llvmlistbot at llvm.org
Wed Sep 3 23:23:53 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
+ // kinds of operations, for which `Node` creation isn't supported, are
+ // encountered (unknown region holding ops). If `fullAffineDependences` is
+ // set, affine memory dependence analysis is performed before concluding that
+ // conflicting affine memory accesses lead to a dependence check; otherwise, a
+ // pair of conflicting affine memory accesses (where one of them is a store
+ // and they are to the same memref) always leads to an edge (conservatively).
+ bool init(bool fullAffineDependences = true);
----------------
bondhugula wrote:
"memory-based" dependences are implied here. Data dependence analysis is the same in this context.
https://github.com/llvm/llvm-project/pull/156422
More information about the Mlir-commits
mailing list