[RISCV] Use uint16_t instead of unsigned for opcodes in the RVV pseudo instruction...
authorCraig Topper <craig.topper@sifive.com>
Sun, 10 Jan 2021 02:00:05 +0000 (18:00 -0800)
committerCraig Topper <craig.topper@sifive.com>
Sun, 10 Jan 2021 03:26:32 +0000 (19:26 -0800)
We currently have about 7000 opcodes in the RISCVGenInstrInfo.inc
enum. We can use uint16_t to store these values. We would need to
grow by nearly 9x before we run out of space so this should last
for a little while.

This reduces the llc binary by 32K.

llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h

index df711f3..99d8c8e 100644 (file)
@@ -371,8 +371,8 @@ namespace RISCVVPseudosTable {
 static const uint8_t InvalidIndex = 0x80;
 
 struct PseudoInfo {
-  unsigned int Pseudo;
-  unsigned int BaseInstr;
+  uint16_t Pseudo;
+  uint16_t BaseInstr;
   uint8_t VLIndex;
   uint8_t SEWIndex;
   uint8_t MergeOpIndex;