Skip to content

Commit 29ed600

Browse files
authored
[AArch64] Simplify ExactFPImm GenericTable. NFC (llvm#121827)
lookupExactFPImmByRepr is never called. The Name field in the table is unused. The Name is only used by the GenericEnum.
1 parent b05be2a commit 29ed600

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

llvm/lib/Target/AArch64/AArch64SystemOperands.td

+1-6
Original file line numberDiff line numberDiff line change
@@ -630,19 +630,14 @@ def ExactFPImmValues : GenericEnum {
630630

631631
def ExactFPImmsList : GenericTable {
632632
let FilterClass = "ExactFPImm";
633-
let Fields = ["Name", "Enum", "Repr"];
633+
let Fields = ["Enum", "Repr"];
634634
}
635635

636636
def lookupExactFPImmByEnum : SearchIndex {
637637
let Table = ExactFPImmsList;
638638
let Key = ["Enum"];
639639
}
640640

641-
def lookupExactFPImmByRepr : SearchIndex {
642-
let Table = ExactFPImmsList;
643-
let Key = ["Repr"];
644-
}
645-
646641
def : ExactFPImm<"zero", "0.0", 0x0>;
647642
def : ExactFPImm<"half", "0.5", 0x1>;
648643
def : ExactFPImm<"one", "1.0", 0x2>;

llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,10 @@ LLVM_DECLARE_ENUM_AS_BITMASK(TailFoldingOpts,
564564
/* LargestValue */ (long)TailFoldingOpts::Reverse);
565565

566566
namespace AArch64ExactFPImm {
567-
struct ExactFPImm {
568-
const char *Name;
569-
int Enum;
570-
const char *Repr;
571-
};
567+
struct ExactFPImm {
568+
int Enum;
569+
const char *Repr;
570+
};
572571
#define GET_ExactFPImmValues_DECL
573572
#define GET_ExactFPImmsList_DECL
574573
#include "AArch64GenSystemOperands.inc"

0 commit comments

Comments
 (0)