[Mlir-commits] [mlir] [mlir][bufferization] Adding the optimize-allocation-liveness pass (PR #101827)
Matthias Springer
llvmlistbot at llvm.org
Sun Aug 11 01:43:10 PDT 2024
================
@@ -232,6 +232,22 @@ def OwnershipBasedBufferDeallocation : Pass<
];
}
+
+def OptimizeAllocationliveness : Pass<
+ "optimize-allocation-liveness", "func::FuncOp"> {
+ let summary = "This pass optimizes the liveness of temp allocations in the input function";
+ let description = [{
+ This pass will go over all the allocations that also have deallocations in the same block i.e. temp buffers.
+ And find the last user/dependency of that allocation , it attempts to move the deallocation right after that last user.
+ This will optimize liveness of the allocations to the minimum.
+ The pass is expected to run after the deallocating pipeline, which places all deallocation at the end of the function.
----------------
matthias-springer wrote:
after the `ownership-based buffer deallocation pipeline`
https://github.com/llvm/llvm-project/pull/101827
More information about the Mlir-commits
mailing list