[all-commits] [llvm/llvm-project] e203a6: [cuda][HIP] `__constant__` should imply constant (...
Alex Voicu via All-commits
all-commits at lists.llvm.org
Sat Sep 28 17:23:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e203a67f4cef5844877f6a5720e659ea09729e9a
https://github.com/llvm/llvm-project/commit/e203a67f4cef5844877f6a5720e659ea09729e9a
Author: Alex Voicu <alexandru.voicu at amd.com>
Date: 2024-09-29 (Sun, 29 Sep 2024)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGenCUDA/address-spaces.cu
M clang/test/CodeGenCUDA/amdgpu-visibility.cu
M clang/test/CodeGenCUDA/anon-ns.cu
M clang/test/CodeGenCUDA/device-var-init.cu
M clang/test/CodeGenCUDA/device-var-linkage.cu
M clang/test/CodeGenCUDA/filter-decl.cu
M clang/test/CodeGenCUDA/static-device-var-no-rdc.cu
M clang/test/CodeGenCUDA/static-device-var-rdc.cu
M clang/test/CodeGenCUDA/template-class-static-member.cu
M clang/test/CodeGenHIP/hipspv-addr-spaces.cpp
M llvm/test/Transforms/GlobalOpt/externally-initialized.ll
Log Message:
-----------
[cuda][HIP] `__constant__` should imply constant (#110182)
Currently, `__constant__` variables do not get unconditionally marked as
`constant` in IR, which seems a bit odd given their definition. This is
generally inconsequential for NVPTX/AMDGPU, since said variables get
emitted in the constant address space for those BEs. However, it is
potentially significant for e.g. HIP-on-SPIR-V cases, as SPIR-V does not
allow casts to/from the constant AS (`UniformConstant`), which forces
`__constant__` variables to be emitted in the global AS, thus making IR
constness meaningful.
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