[llvm] [TableGen][SubtargetEmitter] Early exit from loop in FindWriteResources and FindReadAdvance (PR #92202)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 10:29:52 PDT 2024


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 99fad7ebd85e37d3e25500b3411f6b332f68f108 a802de7dd659639c701bfcccf19d9f08d8a7a0ef -- llvm/utils/TableGen/SubtargetEmitter.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/utils/TableGen/SubtargetEmitter.cpp b/llvm/utils/TableGen/SubtargetEmitter.cpp
index 2c7e0c923c..4b36859b43 100644
--- a/llvm/utils/TableGen/SubtargetEmitter.cpp
+++ b/llvm/utils/TableGen/SubtargetEmitter.cpp
@@ -908,7 +908,7 @@ SubtargetEmitter::FindWriteResources(const CodeGenSchedRW &SchedWrite,
     if (!AliasDef && SchedWrite.TheDef == WR->getValueAsDef("WriteType")) {
       ResDef = WR;
       break;
-    } 
+    }
     if (AliasDef == WR->getValueAsDef("WriteType")) {
       if (ResDef) {
         PrintFatalError(WR->getLoc(), "Resources are defined for both "
@@ -968,7 +968,7 @@ Record *SubtargetEmitter::FindReadAdvance(const CodeGenSchedRW &SchedRead,
     if (!AliasDef && AliasDef == RA->getValueAsDef("ReadType")) {
       ResDef = RA;
       break;
-    } 
+    }
     if (SchedRead.TheDef == RA->getValueAsDef("ReadType")) {
       if (ResDef) {
         PrintFatalError(RA->getLoc(), "Resources are defined for both "

``````````

</details>


https://github.com/llvm/llvm-project/pull/92202


More information about the llvm-commits mailing list