[llvm] [SPIRV] Do not emit @llvm.compiler.used (PR #162678)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 10 01:19:20 PDT 2025
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/162678 at github.com>
================
@@ -2028,9 +2029,13 @@ Instruction *SPIRVEmitIntrinsics::visitUnreachableInst(UnreachableInst &I) {
void SPIRVEmitIntrinsics::processGlobalValue(GlobalVariable &GV,
IRBuilder<> &B) {
- // Skip special artifical variable llvm.global.annotations.
- if (GV.getName() == "llvm.global.annotations")
+ // Skip special artifical variables
+ static const StringSet<> ArtificialGlobals{"llvm.global.annotations",
+ "llvm.used", "llvm.compiler.used"};
----------------
arsenm wrote:
Are these just all the cases with appending linkage? Probably should not use this set though
https://github.com/llvm/llvm-project/pull/162678
More information about the llvm-commits
mailing list