[PATCH] D58518: [HIP] change kernel stub name
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 21 11:08:19 PST 2019
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
My guess is that this is needed because HIP debugger can see symbols from both host and device executables at the same time. Is that so?
If that's the case, I guess HIP may have similar naming problem for `__host__ __device__ foo()` if it's used on both host and device.
================
Comment at: lib/CodeGen/CGCUDANV.cpp:230-231
emitDeviceStubBodyLegacy(CGF, Args);
+ if (CGF.getLangOpts().HIP)
+ CGF.CurFn->setName(CGF.CurFn->getName() + ".stub");
}
----------------
It may be worth adding a comment why kernel stub in HIP needs a different name.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58518/new/
https://reviews.llvm.org/D58518
More information about the cfe-commits
mailing list