[PATCH] D101872: [AArch64][ELF] Prefer to lower MC_GlobalAddress operands to .Lfoo$local

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 17:20:24 PDT 2021


efriedma added a comment.

I'm not sure I understand the practical effect of this.  I mean, I get the immediate effect on the object file, but I'm not sure I understand how this impacts linking.  Without this patch, will we end up with runtime relocations in some cases?  If so, which cases?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:592
   assert(MO.isGlobal() && "caller should check MO.isGlobal");
-  getSymbol(MO.getGlobal())->print(OS, MAI);
+  getSymbolPreferLocal(*MO.getGlobal())->print(OS, MAI);
   printOffset(MO.getOffset(), OS);
----------------
This is target-independent code; what targets does it affect?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101872/new/

https://reviews.llvm.org/D101872



More information about the llvm-commits mailing list