[llvm] [RISCV] Generate RISCVISAInfo in JSON format from RISCVFeatures.td. (PR #90426)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 28 20:04:02 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 b6a8f5486bc12b132ec984bc8767506e3bcb6694 891f0247743a49c46ed46104a2d0cdf1edd8aea0 -- llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
index 3db0a6eb03..66b2bc96ee 100644
--- a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
@@ -182,7 +182,8 @@ static void emitRISCVProcs(RecordKeeper &RK, raw_ostream &OS) {
   OS << "\n#undef TUNE_PROC\n";
 }
 
-static void emitRISCVExtensionInfoJSON(const std::vector<Record *> &Extensions, raw_ostream &OS) {
+static void emitRISCVExtensionInfoJSON(const std::vector<Record *> &Extensions,
+                                       raw_ostream &OS) {
   // Dump supported RISC-V extensions
   OS << "{\n";
   OS << "  \"supported_extensions\": [\n";
@@ -191,7 +192,8 @@ static void emitRISCVExtensionInfoJSON(const std::vector<Record *> &Extensions,
     OS << "      \"name\": \"" << getExtensionName(R) << "\",\n";
     OS << "      \"version\": " << R->getValueAsInt("MajorVersion") << "."
        << R->getValueAsInt("MinorVersion") << ",\n";
-    OS << "      \"experimental\": " << R->getValueAsBit("Experimental") << "\n";
+    OS << "      \"experimental\": " << R->getValueAsBit("Experimental")
+       << "\n";
     if (R != Extensions.back()) {
       OS << "    },\n";
     } else {
@@ -201,7 +203,9 @@ static void emitRISCVExtensionInfoJSON(const std::vector<Record *> &Extensions,
   OS << "  ],\n";
 }
 
-static void emitRISCVImpliedExtensionInfoJSON(const std::vector<Record *> &Extensions, raw_ostream &OS) {
+static void
+emitRISCVImpliedExtensionInfoJSON(const std::vector<Record *> &Extensions,
+                                  raw_ostream &OS) {
   // Dump implied RISC-V extensions
   OS << "  \"implied_extensions\": [\n";
   for (Record *Ext : Extensions) {

``````````

</details>


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


More information about the llvm-commits mailing list