[llvm] [AMDGPU] Emit the relocation symbol for LDS and named barrier when object linking is enabled (PR #192380)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 08:01:20 PDT 2026


================
@@ -8348,6 +8348,16 @@ bool SITargetLowering::shouldUseLDSConstAddress(const GlobalValue *GV) const {
   if (!GV->hasExternalLinkage())
     return true;
 
+  // With object linking, external LDS declarations need relocations so the
+  // linker can assign their offsets.
+  if (AMDGPUTargetMachine::EnableObjectLinking) {
+    if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) {
----------------
arsenm wrote:

GlobalObject? 

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


More information about the llvm-commits mailing list