[Mlir-commits] [llvm] [mlir] [mlir][emitc] Add a ConvertToEmitCPatternInterface for the math dialect (PR #223666)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 15 05:16:58 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/Conversion/MathToEmitC/MathToEmitC.h mlir/lib/Conversion/MathToEmitC/MathToEmitC.cpp mlir/lib/Dialect/Math/IR/MathDialect.cpp mlir/lib/RegisterAllExtensions.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/MathToEmitC/MathToEmitC.cpp b/mlir/lib/Conversion/MathToEmitC/MathToEmitC.cpp
index 2152abd8e..adf06c139 100644
--- a/mlir/lib/Conversion/MathToEmitC/MathToEmitC.cpp
+++ b/mlir/lib/Conversion/MathToEmitC/MathToEmitC.cpp
@@ -26,10 +26,9 @@ struct MathToEmitCDialectInterface : public ConvertToEmitCPatternInterface {
void populateConvertToEmitCConversionPatterns(
ConversionTarget &target, TypeConverter &typeConverter,
RewritePatternSet &patterns, std::optional<bool> lowerToCpp) const final {
- populateConvertMathToEmitCPatterns(patterns,
- lowerToCpp.value_or(true)
- ? emitc::LanguageTarget::cpp11
- : emitc::LanguageTarget::c99);
+ populateConvertMathToEmitCPatterns(
+ patterns, lowerToCpp.value_or(true) ? emitc::LanguageTarget::cpp11
+ : emitc::LanguageTarget::c99);
}
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/223666
More information about the Mlir-commits
mailing list