[Mlir-commits] [mlir] [mlir][Vector] Reuse args buffers in WarpOpToScfIfPattern (PR #204311)
Federico Bruzzone
llvmlistbot at llvm.org
Tue Oct 13 02:28:38 PDT 2026
================
@@ -297,10 +354,13 @@ struct WarpOpToScfIfPattern : public WarpDistributionPattern {
DistributedLoadStoreHelper helper(sequentialVal, distributedVal,
warpOp.getLaneid(), c0);
- // Create buffer before the ifOp.
+ // Reuse an args buffer if possible, otherwise allocate.
rewriter.setInsertionPoint(ifOp);
- Value buffer = options.warpAllocationFn(loc, rewriter, warpOp,
- sequentialVal.getType());
+ Value buffer = tryReuseArgBuffer(reusableArgBuffers,
----------------
FedericoBruzzone wrote:
Shouldn't we skip reuse when the warp op is inside a loop? if yes, either we bail out or we need a barrier.
Also, we need a test for this.
https://github.com/llvm/llvm-project/pull/204311
More information about the Mlir-commits
mailing list