[Mlir-commits] [mlir] [MLIR][Bufferization] Fix IdentityLayoutMap allocation at function boundaries (PR #227253)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 29 22:58:23 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/FuncBufferizableOpInterfaceImpl.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/FuncBufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
index db2992005..b57e0d627 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
@@ -333,17 +333,19 @@ struct CallOpInterface
dynamicOperands.push_back(
rewriter.create<memref::DimOp>(callOp.getLoc(), buffer, i));
}
- FailureOr<Value> alloc = options.allocationFn(
- rewriter, callOp.getLoc(), memrefDstType, dynamicOperands,
- options.bufferAlignment);
+ FailureOr<Value> alloc =
+ options.allocationFn(rewriter, callOp.getLoc(), memrefDstType,
+ dynamicOperands, options.bufferAlignment);
if (failed(alloc))
return failure();
- if (failed(options.memCpyFn(rewriter, callOp.getLoc(), buffer, *alloc)))
+ if (failed(
+ options.memCpyFn(rewriter, callOp.getLoc(), buffer, *alloc)))
return failure();
buffer = *alloc;
} else {
- FailureOr<Value> replacement = bufferization::castOrReallocMemRefValue(
- rewriter, buffer, memrefDstType, options);
+ FailureOr<Value> replacement =
+ bufferization::castOrReallocMemRefValue(rewriter, buffer,
+ memrefDstType, options);
if (failed(replacement))
return failure();
buffer = *replacement;
``````````
</details>
https://github.com/llvm/llvm-project/pull/227253
More information about the Mlir-commits
mailing list