[llvm] [AArch64] Simplify ExactFPImm GenericTable. NFC (PR #121827)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 12:22:58 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-aarch64

Author: Craig Topper (topperc)

<details>
<summary>Changes</summary>

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
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;
   };

``````````

</details>


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


More information about the llvm-commits mailing list