[PATCH] D150935: [NFC][RISCV] Replace global def containing only one field with defvar

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 21 19:49:07 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5ba10ad9dc43: [NFC][RISCV] Replace global def containing only one field with defvar (authored by pcwang-thead).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150935/new/

https://reviews.llvm.org/D150935

Files:
  llvm/lib/Target/RISCV/RISCVRegisterInfo.td


Index: llvm/lib/Target/RISCV/RISCVRegisterInfo.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+++ llvm/lib/Target/RISCV/RISCVRegisterInfo.td
@@ -342,9 +342,7 @@
 defvar vbool64_t = nxv1i1;
 
 // There is no need to define register classes for fractional LMUL.
-def LMULList {
-  list<int> m = [1, 2, 4, 8];
-}
+defvar LMULList = [1, 2, 4, 8];
 
 //===----------------------------------------------------------------------===//
 // Utility classes for segment load/store.
@@ -576,7 +574,7 @@
            (add (sequence "V%u", 8, 31),
                 (sequence "V%u", 0, 7)), 1>;
 
-foreach m = LMULList.m in {
+foreach m = LMULList in {
   foreach nf = NFList<m>.L in {
     def "VRN" # nf # "M" # m # "NoV0": VReg<[untyped],
                                (add !cast<RegisterTuples>("VN" # nf # "M" # m # "NoV0")),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150935.524147.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230522/7206c7a4/attachment.bin>


More information about the llvm-commits mailing list