[Mlir-commits] [mlir] [mlir][bufferization] Simplify helper `potentiallyAliasesMemref` (PR #78690)

Matthias Springer llvmlistbot at llvm.org
Tue Jan 23 00:11:45 PST 2024


================
@@ -77,18 +77,12 @@ static bool distinctAllocAndBlockArgument(Value v1, Value v2) {
   return areDistinct(v1Base, v2Base) || areDistinct(v2Base, v1Base);
 }
 
-/// Checks if `memref` may or must alias a MemRef in `otherList`. It is often a
-/// requirement of optimization patterns that there cannot be any aliasing
-/// memref in order to perform the desired simplification. The `allowSelfAlias`
-/// argument indicates whether `memref` may be present in `otherList` which
-/// makes this helper function applicable to situations where we already know
-/// that `memref` is in the list but also when we don't want it in the list.
+/// Checks if `memref` may potentially alias a MemRef in `otherList`. It is
----------------
matthias-springer wrote:

I'm going to rewrite this entire function in a future commit that I haven't sent out for review yet. Another issue here is that we are interested in "same allocation" and not "aliasing". These are slightly different properties. I'm going to update that part of the comment as well.


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


More information about the Mlir-commits mailing list