[Mlir-commits] [mlir] [MLIR][Remark] Add remark linking and query-based related remarks (PR #180953)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Feb 11 06:49:21 PST 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,h -- mlir/include/mlir/IR/Remarks.h mlir/lib/IR/Remarks.cpp mlir/test/lib/Pass/TestRemarksPass.cpp mlir/unittests/IR/RemarkTest.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/unittests/IR/RemarkTest.cpp b/mlir/unittests/IR/RemarkTest.cpp
index 261d695ad..3a7fd7a61 100644
--- a/mlir/unittests/IR/RemarkTest.cpp
+++ b/mlir/unittests/IR/RemarkTest.cpp
@@ -230,7 +230,9 @@ TEST(Remark, TestOutputOptimizationRemarkDiagnostic) {
int tripBad = 4;
int threshold = 256;
- remark::missed(loc, remark::RemarkOpts::name("").category(categoryUnroll).subCategory("unroller2"))
+ remark::missed(loc, remark::RemarkOpts::name("")
+ .category(categoryUnroll)
+ .subCategory("unroller2"))
<< remark::reason("tripCount={0} < threshold={1}", tripBad, threshold);
remark::missed(loc, remark::RemarkOpts::name("").category(categoryUnroll))
@@ -310,12 +312,20 @@ TEST(Remark, TestCustomOptimizationRemarkDiagnostic) {
ASSERT_TRUE(succeeded(isEnabled)) << "Failed to enable remark engine";
// Remark 1: pass, category LoopUnroll
- remark::passed(loc, remark::RemarkOpts::name("").category(categoryLoopunroll).subCategory(myPassname1)) << pass1Msg;
+ remark::passed(loc, remark::RemarkOpts::name("")
+ .category(categoryLoopunroll)
+ .subCategory(myPassname1))
+ << pass1Msg;
// Remark 2: failure, category LoopUnroll
- remark::failed(loc, remark::RemarkOpts::name("").category(categoryLoopunroll).subCategory(myPassname2))
+ remark::failed(loc, remark::RemarkOpts::name("")
+ .category(categoryLoopunroll)
+ .subCategory(myPassname2))
<< remark::reason(pass2Msg);
// Remark 3: pass, category Inline (should not be printed)
- remark::passed(loc, remark::RemarkOpts::name("").category(categoryInline).subCategory(myPassname1)) << pass3Msg;
+ remark::passed(loc, remark::RemarkOpts::name("")
+ .category(categoryInline)
+ .subCategory(myPassname1))
+ << pass3Msg;
}
llvm::errs().flush();
@@ -394,7 +404,8 @@ TEST(Remark, TestRemarkFinal) {
EXPECT_NE(errOut.find(pass1Msg), std::string::npos); // shown (failed)
EXPECT_NE(errOut.find(pass2Msg), std::string::npos); // shown (missed)
EXPECT_NE(errOut.find(pass3Msg), std::string::npos); // shown (passed)
- EXPECT_NE(errOut.find(pass4Msg), std::string::npos); // shown (passed, diff loc)
+ EXPECT_NE(errOut.find(pass4Msg),
+ std::string::npos); // shown (passed, diff loc)
}
TEST(Remark, TestArgWithAttribute) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/180953
More information about the Mlir-commits
mailing list