[Mlir-commits] [llvm] [mlir] [mlir][emitc] Ensure memref-to-emitc applies type converter to memref element types (PR #203742)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Jun 13 21:19:44 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/Conversion/MemRefToEmitC/MemRefToEmitC.cpp mlir/test/lib/Dialect/Test/TestDialectInterfaces.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/Conversion/MemRefToEmitC/MemRefToEmitC.cpp b/mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp
index 175b24baa..c44a5b3cd 100644
--- a/mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp
+++ b/mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp
@@ -115,8 +115,7 @@ calculateMemrefTotalSizeBytes(Location loc, MemRefType memrefType,
emitc::CallOpaqueOp elementSize = emitc::CallOpaqueOp::create(
builder, loc, emitc::SizeTType::get(builder.getContext()),
builder.getStringAttr("sizeof"), ValueRange{},
- ArrayAttr::get(builder.getContext(),
- {TypeAttr::get(elementType)}));
+ ArrayAttr::get(builder.getContext(), {TypeAttr::get(elementType)}));
IndexType indexType = builder.getIndexType();
int64_t numElements = llvm::product_of(memrefType.getShape());
``````````
</details>
https://github.com/llvm/llvm-project/pull/203742
More information about the Mlir-commits
mailing list