[llvm] [SPIRV] Do not emit @llvm.compiler.used (PR #162678)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 09:03:54 PDT 2025
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.compiler.used"};
----------------
MrSidims wrote:
while we are here, may be:
```suggestion
static const StringSet<> ArtificialGlobals{"llvm.global.annotations",
"llvm.compiler.used",
"llvm.used"};
```
?
https://github.com/llvm/llvm-project/pull/162678
More information about the llvm-commits
mailing list