[PATCH] D63335: [HIP] Change kernel stub name again
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 14 10:03:20 PDT 2019
hliao marked an inline comment as done.
hliao added a comment.
it's requested from debugger people. they don't want to the host-side stub could match the device-side kernel function name. the previous scheme cannot prevent that.
================
Comment at: clang/lib/CodeGen/CGCUDANV.cpp:222-226
+ assert((CGF.CGM.getContext().getAuxTargetInfo() &&
+ (CGF.CGM.getContext().getAuxTargetInfo()->getCXXABI() !=
+ CGF.CGM.getContext().getTargetInfo().getCXXABI())) ||
+ getDeviceStubName(getDeviceSideName(CGF.CurFuncDecl)) ==
+ CGF.CurFn->getName());
----------------
tra wrote:
> I'm not sure I understand what exactly this assertion checks.
> The condition appears to be true is host/device ABIs are different OR the name of the current function is the same as the (possibly mangled) device-side name + __device_stub_ prefix.
>
> While the first part makes sense, I'm not sure I understand the name comparison part.
> Could you tell me more and, maybe, add a comment explaining what's going on here.
The second is to ensure, if, under the same ABI, kernel stub name derived from device-side name mangling should be the same the sub name generated from host-side, CGF.CurFn->getName() is the mangled named from host compilation
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63335/new/
https://reviews.llvm.org/D63335
More information about the cfe-commits
mailing list