[llvm] [AMDGPU] Add object linking support for LDS and named barrier lowering in the middle end (PR #191645)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 10:56:31 PDT 2026


================
@@ -546,6 +546,12 @@ static cl::opt<bool>
                               "and asan instrument resulting IR."),
                      cl::init(true), cl::Hidden);
 
+static cl::opt<bool, true> EnableObjectLinking(
----------------
jhuber6 wrote:

I strongly feel like this should be default on to match NVIDIA's semantics. We want things to be correct by default. It would likely be better to have RDC-mode compilation pass this like we do with those weird internalize symbol flags if we want to suppress it, but ultimately the design should ideally work such that LTO can remove the ABI details if they are unneeded in the merged TU.

For NVPTX, every relocatable ELF object they create has the necessary ABI details baked in. The `-fno-gpu-rdc` case produces an executable, which would be more in-line with what I suggested above where clang passes a flag to suppress this.

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


More information about the llvm-commits mailing list