diff options
author | Alex Voicu <alexandru.voicu@amd.com> | 2024-09-29 01:22:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-29 01:22:52 +0100 |
commit | e203a67f4cef5844877f6a5720e659ea09729e9a (patch) | |
tree | 009db94c26c23ef9bbe793f562107adb137cc366 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6558e5615ae9e6af6168b0a363808854fd66663f (diff) | |
download | llvm-e203a67f4cef5844877f6a5720e659ea09729e9a.zip llvm-e203a67f4cef5844877f6a5720e659ea09729e9a.tar.gz llvm-e203a67f4cef5844877f6a5720e659ea09729e9a.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions