[llvm] [SPIR-V] Add NonSemantic.AuxData emission (-spirv-preserve-auxdata) and preserve available_externally linkage (PR #200002)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 04:06:54 PDT 2026
================
@@ -1217,6 +1217,11 @@ getSpirvLinkageTypeFor(const SPIRVSubtarget &ST, const GlobalValue &GV) {
if (GV.hasLocalLinkage())
return std::nullopt;
+ // Preserved via NonSemantic.AuxData; skip LinkageAttributes.
+ if (const auto *F = dyn_cast<Function>(&GV))
+ if (F->hasFnAttribute(SPIRV_WAS_AVAILABLE_EXTERNALLY_ATTR))
+ return std::nullopt;
+
----------------
aobolensk wrote:
Without the extension, gating would emit Export linkage on AE functions. I'm not sure it is right behavior
https://github.com/llvm/llvm-project/pull/200002
More information about the llvm-commits
mailing list