[all-commits] [llvm/llvm-project] 8428c7: [CUDA][HIP] Do not treat host var address as const...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Fri Jan 28 13:08:37 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8428c75da1ab3149292c255057173cb502729d92
https://github.com/llvm/llvm-project/commit/8428c75da1ab3149292c255057173cb502729d92
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2022-01-28 (Fri, 28 Jan 2022)
Changed paths:
M clang/include/clang/AST/ASTContext.h
M clang/lib/AST/ExprConstant.cpp
M clang/lib/Sema/SemaCUDA.cpp
A clang/test/CodeGenCUDA/const-var.cu
A clang/test/SemaCUDA/const-var.cu
Log Message:
-----------
[CUDA][HIP] Do not treat host var address as constant in device compilation
Currently clang treats host var address as constant in device compilation,
which causes const vars initialized with host var address promoted to
device variables incorrectly and results in undefined symbols.
This patch fixes that.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D118153
Fixes: SWDEV-309881
Change-Id: I0a69357063c6f8539ef259c96c250d04615f4473
More information about the All-commits
mailing list