[llvm] [mlir][vector] Enable transfer op hoisting with dynamic indices (PR #68500)

Matthias Springer via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 15 16:36:38 PDT 2023


================
@@ -105,16 +105,23 @@ bool checkSameValueRAW(TransferWriteOp defWrite, TransferReadOp read);
 /// op.
 bool checkSameValueWAW(TransferWriteOp write, TransferWriteOp priorWrite);
 
-/// Same behavior as `isDisjointTransferSet` but doesn't require the operations
-/// to have the same tensor/memref. This allows comparing operations accessing
-/// different tensors.
+/// Return true if we can prove that the transfer operations access disjoint
+/// memory, without requring the accessed tensor/memref to be the same.
+///
+/// If `testDynamicValueUsingBounds` is true, tries to test dynamic values
+/// via ValueBoundsOpInterface.
 bool isDisjointTransferIndices(VectorTransferOpInterface transferA,
-                               VectorTransferOpInterface transferB);
+                               VectorTransferOpInterface transferB,
+                               bool testDynamicValueUsingBounds = false);
----------------
matthias-springer wrote:

Good point, it could be expensive because it traverses IR and there is currently no caching (in case multiple bounds are queried).

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


More information about the llvm-commits mailing list