[llvm] [AArch64] Simplify ExactFPImm GenericTable. NFC (PR #121827)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 11:46:12 PST 2025
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/121827
>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 1/2] [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;
};
>From 7eeabb487cb514283115392ae8dd69b835b5d350 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Tue, 7 Jan 2025 11:45:49 -0800
Subject: [PATCH 2/2] fixup! clang-format
---
llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
index a1288ef313e35e..e04a8abaebccad 100644
--- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
@@ -564,10 +564,10 @@ LLVM_DECLARE_ENUM_AS_BITMASK(TailFoldingOpts,
/* LargestValue */ (long)TailFoldingOpts::Reverse);
namespace AArch64ExactFPImm {
- struct ExactFPImm {
- int Enum;
- const char *Repr;
- };
+struct ExactFPImm {
+ int Enum;
+ const char *Repr;
+};
#define GET_ExactFPImmValues_DECL
#define GET_ExactFPImmsList_DECL
#include "AArch64GenSystemOperands.inc"
More information about the llvm-commits
mailing list