Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64] Simplify ExactFPImm GenericTable. NFC #121827

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Jan 6, 2025

lookupExactFPImmByRepr is never called. The Name field in the table is unused. The Name is only used by the GenericEnum.

lookupExactFPImmByRepr is never called. The Name field in the table
is unneeded. The Name is only used by the GenericEnum.
@llvmbot
Copy link
Member

llvmbot commented Jan 6, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Craig Topper (topperc)

Changes

lookupExactFPImmByRepr is never called. The Name field in the table is unused. The Name is only used by the GenericEnum.


Full diff: https://github.com/llvm/llvm-project/pull/121827.diff

2 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64SystemOperands.td (+1-6)
  • (modified) llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h (-1)
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;
   };

Copy link

github-actions bot commented Jan 6, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@topperc topperc requested a review from sdesmalen-arm January 7, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants