[llvm] [AArch64][NFC] Avoid relocations in LdStNInstrDesc (PR #202025)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 03:18:45 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-aarch64

Author: Alexis Engelke (aengelke)

<details>
<summary>Changes</summary>

These are small strings, so instead of an 8 byte string pointer that
needs a relocation store the strings directly inline. This avoids 320
relocations in libLLVM.so.


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


1 Files Affected:

- (modified) llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp (+2-2) 


``````````diff
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
index 2df769539960d..4e4b58839778b 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
@@ -421,8 +421,8 @@ static bool isTblTbxInstruction(unsigned Opcode, StringRef &Layout,
 
 struct LdStNInstrDesc {
   unsigned Opcode;
-  const char *Mnemonic;
-  const char *Layout;
+  char Mnemonic[6];
+  char Layout[6];
   int ListOperand;
   bool HasLane;
   int NaturalOffset;

``````````

</details>


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


More information about the llvm-commits mailing list