[Mlir-commits] [mlir] [mlir][bufferization] Introduce reconcileBufferTypeMismatchFn hook (PR #202667)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Jun 9 07:10:41 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 h,cpp -- mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h mlir/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h mlir/lib/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.cpp mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp mlir/test/lib/Dialect/Bufferization/TestOneShotModuleBufferize.cpp mlir/test/lib/Dialect/Test/TestOpDefs.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/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h b/mlir/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h
index d5f11a296..043c248e8 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h
@@ -81,9 +81,9 @@ struct OpWithUnstructuredControlFlowBufferizableOpInterfaceExternalModel
if (bufferType == callerType)
continue;
- // If the computed buffer type does not match the computed buffer type
- // of the earlier forwarded operands, fall back to a reconciled buffer
- // type.
+ // If the computed buffer type does not match the computed buffer type
+ // of the earlier forwarded operands, fall back to a reconciled buffer
+ // type.
#ifndef NDEBUG
auto tensorType = value.getType();
if (isa<TensorType>(tensorType)) {
diff --git a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
index d6bd11305..df5b76134 100644
--- a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
@@ -556,8 +556,8 @@ static FailureOr<BufferLikeType> computeLoopRegionIterArgBufferType(
if (*initArgBufferType == yieldedValueBufferType)
return yieldedValueBufferType;
- // If there is a mismatch between the yielded buffer type and the init_arg
- // buffer type, the buffer type must be reconciled.
+ // If there is a mismatch between the yielded buffer type and the init_arg
+ // buffer type, the buffer type must be reconciled.
#ifndef NDEBUG
if (auto iterTensorType = dyn_cast<TensorType>(iterArg.getType())) {
auto yieldedBufferType = cast<BaseMemRefType>(yieldedValueBufferType);
``````````
</details>
https://github.com/llvm/llvm-project/pull/202667
More information about the Mlir-commits
mailing list