[Mlir-commits] [mlir] MLIR: add_buffer_lifetime (PR #186670)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Mar 15 07:02:04 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Dialect/Bufferization/Transforms/BufferLifetimeStats.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferLifetimeStats.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferLifetimeStats.cpp
index ec2959a34..86f037634 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/BufferLifetimeStats.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferLifetimeStats.cpp
@@ -172,10 +172,9 @@ public:
if (areNonOverlapping(intervals[i], intervals[j]))
++nonOverlappingPairs;
- llvm::outs() << "--- Buffer Lifetime Statistics for '"
- << func.getSymName() << "' ---\n";
- llvm::outs() << " Tracked allocations : " << intervals.size()
- << "\n";
+ llvm::outs() << "--- Buffer Lifetime Statistics for '" << func.getSymName()
+ << "' ---\n";
+ llvm::outs() << " Tracked allocations : " << intervals.size() << "\n";
llvm::outs() << " Total allocated bytes : " << totalBytes << "\n";
llvm::outs() << " Peak live bytes : " << peakLiveBytes << "\n";
llvm::outs() << " Non-overlapping pairs : " << nonOverlappingPairs
@@ -183,9 +182,9 @@ public:
for (const auto &interval : intervals) {
llvm::outs() << " Buffer: " << interval.allocResult.getType()
- << " | size=" << interval.sizeInBytes
- << " | lifetime=[" << interval.allocIndex << ", "
- << interval.deallocIndex << ")\n";
+ << " | size=" << interval.sizeInBytes << " | lifetime=["
+ << interval.allocIndex << ", " << interval.deallocIndex
+ << ")\n";
}
llvm::outs() << "---\n";
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/186670
More information about the Mlir-commits
mailing list