[PATCH] D58518: [HIP] change kernel stub name

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 11:24:50 PST 2019


yaxunl marked an inline comment as done.
yaxunl added a comment.

In D58518#1406124 <https://reviews.llvm.org/D58518#1406124>, @tra wrote:

> 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.


Probably, will fix it in seperate patch if it is true.



================
Comment at: lib/CodeGen/CGCUDANV.cpp:230-231
     emitDeviceStubBodyLegacy(CGF, Args);
+  if (CGF.getLangOpts().HIP)
+    CGF.CurFn->setName(CGF.CurFn->getName() + ".stub");
 }
----------------
tra wrote:
> It may be worth adding a comment why kernel stub in HIP needs a different name.
will do when commit


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58518/new/

https://reviews.llvm.org/D58518





More information about the cfe-commits mailing list