[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 19 10:39:49 PDT 2019
tra added a comment.
SGTM in principle. Folding the stubs would be bad as their addresses are implicitly used to identify the kernels to launch.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4294
setNonAliasAttributes(GD, Fn);
SetLLVMFunctionAttributesForDefinition(D, Fn);
if (const ConstructorAttr *CA = D->getAttr<ConstructorAttr>())
----------------
Perhaps this should be pushed further down into `shouldBeInCOMDAT()` which seems to be the right place to decide whether something is not suitable for comdat.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63277/new/
https://reviews.llvm.org/D63277
More information about the cfe-commits
mailing list