[PATCH] D123417: [RISCV] Remove ExtZvl enum from RISCVSubtarget. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 10:15:30 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc266e504309f: [RISCV] Remove ExtZvl enum from RISCVSubtarget. NFC (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123417/new/
https://reviews.llvm.org/D123417
Files:
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
Index: llvm/lib/Target/RISCV/RISCVSubtarget.h
===================================================================
--- llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -34,22 +34,6 @@
class RISCVSubtarget : public RISCVGenSubtargetInfo {
public:
- enum ExtZvl : unsigned {
- NotSet = 0,
- Zvl32b = 32,
- Zvl64b = 64,
- Zvl128b = 128,
- Zvl256b = 256,
- Zvl512b = 512,
- Zvl1024b = 1024,
- Zvl2048b = 2048,
- Zvl4096b = 4096,
- Zvl8192b = 8192,
- Zvl16384b = 16384,
- Zvl32768b = 32768,
- Zvl65536b = 65536
- };
-
enum RISCVProcFamilyEnum : uint8_t {
Others,
SiFive7,
@@ -108,7 +92,7 @@
bool EnableRVCHintInstrs = true;
bool EnableSaveRestore = false;
unsigned XLen = 32;
- ExtZvl ZvlLen = ExtZvl::NotSet;
+ unsigned ZvlLen = 0;
MVT XLenVT = MVT::i32;
uint8_t MaxInterleaveFactor = 2;
RISCVABI::ABI TargetABI = RISCVABI::ABI_Unknown;
@@ -174,7 +158,7 @@
bool hasStdExtZbr() const { return HasStdExtZbr; }
bool hasStdExtZbs() const { return HasStdExtZbs; }
bool hasStdExtZbt() const { return HasStdExtZbt; }
- bool hasStdExtZvl() const { return ZvlLen != ExtZvl::NotSet; }
+ bool hasStdExtZvl() const { return ZvlLen != 0; }
bool hasStdExtZvfh() const { return HasStdExtZvfh; }
bool hasStdExtZfhmin() const { return HasStdExtZfhmin; }
bool hasStdExtZfh() const { return HasStdExtZfh; }
@@ -208,7 +192,7 @@
return 0;
}
unsigned getMinVLen() const { return ZvlLen; }
- unsigned getMaxVLen() const { return Zvl65536b; }
+ unsigned getMaxVLen() const { return 65536; }
unsigned getRealMinVLen() const {
unsigned VLen = getMinRVVVectorSizeInBits();
return VLen == 0 ? getMinVLen() : VLen;
Index: llvm/lib/Target/RISCV/RISCV.td
===================================================================
--- llvm/lib/Target/RISCV/RISCV.td
+++ llvm/lib/Target/RISCV/RISCV.td
@@ -334,13 +334,13 @@
AssemblerPredicate<(all_of(not FeatureNoRVCHints)),
"RVC Hint Instructions">;
-def FeatureStdExtZvl32b : SubtargetFeature<"zvl32b", "ZvlLen", "ExtZvl::Zvl32b",
+def FeatureStdExtZvl32b : SubtargetFeature<"zvl32b", "ZvlLen", "32",
"'Zvl' (Minimum Vector Length) 32">;
foreach i = { 6-15 } in {
defvar I = !shl(1, i);
def FeatureStdExtZvl#I#b :
- SubtargetFeature<"zvl"#I#"b", "ZvlLen", "ExtZvl::Zvl"#I#"b",
+ SubtargetFeature<"zvl"#I#"b", "ZvlLen", !cast<string>(I),
"'Zvl' (Minimum Vector Length) "#I,
[!cast<SubtargetFeature>("FeatureStdExtZvl"#!srl(I, 1)#"b")]>;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123417.421953.patch
Type: text/x-patch
Size: 2668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220411/aa5ae385/attachment.bin>
More information about the llvm-commits
mailing list