[llvm] [TableGen][GlobalISel] Add specialized opcodes (PR #74823)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 03:06:43 PST 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 faecc736e2ac3cd8c77bebf41b1ed2e2d8cb575f 2ff481ca23e3c36e3e64f93c3700e41eb77e5690 -- llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h llvm/utils/TableGen/GlobalISelMatchTable.cpp llvm/utils/TableGen/GlobalISelMatchTable.h llvm/utils/TableGen/GlobalISelMatchTableExecutorEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/GlobalISelMatchTable.cpp b/llvm/utils/TableGen/GlobalISelMatchTable.cpp
index fdfef9da3c..349598266a 100644
--- a/llvm/utils/TableGen/GlobalISelMatchTable.cpp
+++ b/llvm/utils/TableGen/GlobalISelMatchTable.cpp
@@ -1241,7 +1241,8 @@ void ImmOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
 void ConstantIntOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
                                                      RuleMatcher &Rule) const {
   const bool IsInt8 = isInt<8>(Value);
-  Table << MatchTable::Opcode(IsInt8 ? "GIM_CheckConstantInt8" : "GIM_CheckConstantInt")
+  Table << MatchTable::Opcode(IsInt8 ? "GIM_CheckConstantInt8"
+                                     : "GIM_CheckConstantInt")
         << MatchTable::Comment("MI") << MatchTable::ULEB128Value(InsnVarID)
         << MatchTable::Comment("Op") << MatchTable::ULEB128Value(OpIdx)
         << MatchTable::IntValue(IsInt8 ? 1 : 8, Value) << MatchTable::LineBreak;
@@ -1949,13 +1950,14 @@ void TempRegRenderer::emitRenderOpcodes(MatchTable &Table,
     assert(!IsDef);
     Table << MatchTable::Opcode("GIR_AddTempSubRegister");
   } else
-    Table << MatchTable::Opcode(NeedsFlags ? "GIR_AddTempRegister" : "GIR_AddSimpleTempRegister");
+    Table << MatchTable::Opcode(NeedsFlags ? "GIR_AddTempRegister"
+                                           : "GIR_AddSimpleTempRegister");
 
   Table << MatchTable::Comment("InsnID") << MatchTable::ULEB128Value(InsnID)
         << MatchTable::Comment("TempRegID")
         << MatchTable::ULEB128Value(TempRegID);
 
-  if(!NeedsFlags) {
+  if (!NeedsFlags) {
     Table << MatchTable::LineBreak;
     return;
   }
@@ -2004,7 +2006,8 @@ void ImmRenderer::emitRenderOpcodes(MatchTable &Table,
 
 void SubRegIndexRenderer::emitRenderOpcodes(MatchTable &Table,
                                             RuleMatcher &Rule) const {
-  ImmRenderer::emitAddImm(Table, Rule, InsnID, SubRegIdx->EnumValue, "SubRegIndex");
+  ImmRenderer::emitAddImm(Table, Rule, InsnID, SubRegIdx->EnumValue,
+                          "SubRegIndex");
 }
 
 //===- RenderComplexPatternOperand ----------------------------------------===//

``````````

</details>


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


More information about the llvm-commits mailing list