[llvm] [AArch64] Simplify ExactFPImm GenericTable. NFC (PR #121827)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 12:22:22 PST 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/121827
lookupExactFPImmByRepr is never called. The Name field in the table is unused. The Name is only used by the GenericEnum.
>From c031071b2827556a1b1300860b317e3399e0e1e5 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 6 Jan 2025 12:18:30 -0800
Subject: [PATCH] [AArch64] Simplify ExactFPImm GenericTable. NFC
lookupExactFPImmByRepr is never called. The Name field in the table
is unneeded. The Name is only used by the GenericEnum.
---
llvm/lib/Target/AArch64/AArch64SystemOperands.td | 7 +------
llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h | 1 -
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/llvm/lib/Target/AArch64/AArch64SystemOperands.td b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
index c76fc8abeedad5..3693763873f2d1 100644
--- a/llvm/lib/Target/AArch64/AArch64SystemOperands.td
+++ b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
@@ -630,7 +630,7 @@ def ExactFPImmValues : GenericEnum {
def ExactFPImmsList : GenericTable {
let FilterClass = "ExactFPImm";
- let Fields = ["Name", "Enum", "Repr"];
+ let Fields = ["Enum", "Repr"];
}
def lookupExactFPImmByEnum : SearchIndex {
@@ -638,11 +638,6 @@ def lookupExactFPImmByEnum : SearchIndex {
let Key = ["Enum"];
}
-def lookupExactFPImmByRepr : SearchIndex {
- let Table = ExactFPImmsList;
- let Key = ["Repr"];
-}
-
def : ExactFPImm<"zero", "0.0", 0x0>;
def : ExactFPImm<"half", "0.5", 0x1>;
def : ExactFPImm<"one", "1.0", 0x2>;
diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
index 94bba4e4c35199..a1288ef313e35e 100644
--- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
@@ -565,7 +565,6 @@ LLVM_DECLARE_ENUM_AS_BITMASK(TailFoldingOpts,
namespace AArch64ExactFPImm {
struct ExactFPImm {
- const char *Name;
int Enum;
const char *Repr;
};
More information about the llvm-commits
mailing list