[all-commits] [llvm/llvm-project] a774e7: [SPIR-V] Fix OpName and LinkageAttributes decorati...
Vyacheslav Levytskyy via All-commits
all-commits at lists.llvm.org
Tue Jan 7 02:14:32 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8
https://github.com/llvm/llvm-project/commit/a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8
Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
Date: 2025-01-07 (Tue, 07 Jan 2025)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
M llvm/lib/Target/SPIRV/SPIRVUtils.h
A llvm/test/CodeGen/SPIRV/global-var-name-linkage.ll
Log Message:
-----------
[SPIR-V] Fix OpName and LinkageAttributes decoration of global variables (#120492)
This PR changes `getGlobalIdentifier()` into `getName()` value when
creating a name of a global variable, and fixes generation of
LinkageAttributes decoration of global variables by taking into account
Private Linkage in addition to Internal.
Previous implementation led to an issue with back translation of SPIR-V
to LLVM IR, e.g.:
```
@__const.G1 = private unnamed_addr addrspace(1) constant %my_type undef
...
Fails to verify module: 'common' global may not be marked constant!
ptr addrspace(1) @"llvm-link;__const.G1"
```
A reproducer is included as a new test case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list