[llvm] [RISCV] Add extension information to RISCVFeatures.td. NFC (PR #89326)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 21 20:39:15 PDT 2024


================
@@ -10,119 +10,155 @@
 // RISC-V subtarget features and instruction predicates.
 //===----------------------------------------------------------------------===//
 
+// Subclass of SubtargetFeature to be used when the feature is also a RISC-V
+// extension. Extensions have a version and may be experimental.
+//
+// name      - Name of the extension in lower case.q
+// major     - Major version of extension
+// minor     - Minor version of extension
+// fieldname - name of field to create in RISCVSubtarget.
----------------
wangpc-pp wrote:

This is can be standarized, we force the name of `RISCVExtension` to be in form of `FeatureXXX` and then the fieldname can be `!subst(NAME, "Feature", "Has")`.

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


More information about the llvm-commits mailing list