[PATCH] D98814: [CUDA][HIP] Mark device var used by host only
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 17 16:39:32 PDT 2021
tra added inline comments.
================
Comment at: clang/lib/CodeGen/CGCUDANV.cpp:1102
+ Info.D->isUsed() && !Info.D->hasAttr<UsedAttr>()) {
+ CGM.addCompilerUsedGlobal(Info.Var);
+ }
----------------
Do we want to limit it further to only externally-visible variables?
I think we already externalize the variables we want to be visible across host/device boundary.
If the variable is not visible, there's no point keeping it around as the runtime will not be able to find it in the GPU binary.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98814/new/
https://reviews.llvm.org/D98814
More information about the cfe-commits
mailing list