[Mlir-commits] [mlir] [MLIR][Affine] Fix memref replacement in affine-data-copy-generate (PR #139016)
Uday Bondhugula
llvmlistbot at llvm.org
Thu May 29 22:49:05 PDT 2025
================
@@ -115,13 +115,16 @@ static bool doubleBuffer(Value oldMemRef, AffineForOp forOp) {
// replaceAllMemRefUsesWith will succeed unless the forOp body has
// non-dereferencing uses of the memref (dealloc's are fine though).
- if (failed(replaceAllMemRefUsesWith(
- oldMemRef, newMemRef,
- /*extraIndices=*/{ivModTwoOp},
- /*indexRemap=*/AffineMap(),
- /*extraOperands=*/{},
- /*symbolOperands=*/{},
- /*domOpFilter=*/&*forOp.getBody()->begin()))) {
+ auto userFilterFn = [&](Operation *user) {
----------------
bondhugula wrote:
If the IR itself is being mutated/transformed, it can't be done just once on entry. We were earlier doing it further inside RAMUW; this change brings it outside - so strictly better. We can see if it can be hoisted further up.
https://github.com/llvm/llvm-project/pull/139016
More information about the Mlir-commits
mailing list