[llvm] [TableGen] Handle duplicate rules in combiners (PR #69296)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 01:41:20 PDT 2023
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 e483673246bdee06e54ec06fd04236bc9fee7f63 ff4317ad4c91beccd1d2a400653947786598f2ff -- llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
index 11651526be8a..91147b1dc052 100644
--- a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
@@ -3637,14 +3637,16 @@ void GICombinerEmitter::gatherRules(
}
StringRef RuleName = Rec->getName();
- if(!RulesSeen.insert(RuleName).second) {
- PrintWarning(Rec->getLoc(), "skipping rule '" + Rec->getName() + "' because it has already been processed");
+ if (!RulesSeen.insert(RuleName).second) {
+ PrintWarning(Rec->getLoc(),
+ "skipping rule '" + Rec->getName() +
+ "' because it has already been processed");
continue;
}
AllCombineRules.emplace_back(NextRuleID, Rec->getName().str());
CombineRuleBuilder CRB(Target, SubtargetFeatures, *Rec, NextRuleID++,
- ActiveRules);
+ ActiveRules);
if (!CRB.parseAll()) {
assert(ErrorsPrinted && "Parsing failed without errors!");
``````````
</details>
https://github.com/llvm/llvm-project/pull/69296
More information about the llvm-commits
mailing list