[PATCH] D63335: [HIP] Change kernel stub name again

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 14:29:30 PDT 2019


tra requested changes to this revision.
tra added a comment.
This revision now requires changes to proceed.

In D63335#1544315 <https://reviews.llvm.org/D63335#1544315>, @hliao wrote:

> > Sorry, I still don't think I understand the reasons for this change. The stub and the kernel do have a different name now. I don't quite get it why the debugger can differentiate the names when they differ by prefix, but can't when they differ by suffix. It sounds like an attempt to work around a problem somewhere else.
> > 
> > Could you talk to the folks requesting the change and get more details on what exactly we need to do here and, more importantly, why.
>
> But, after unmangling, debugger still could match both as they are almost identical excep the final variants, like `clone`. The debugger will set all locations matching that specified kernel name.


OK, so the real issue is that demangled name looks identical to debugger.
One way to deal with that is to , essentially, break mangling in compiler.
Another would be to teach debugger how to distinguish the stub from the kernel using additional information likely available to debugger (i.e. mangled name or the location of the symbol -- is it in the host binary or in the GPU binary).

I would argue that breaking mangling is not the best choice here. 
I think debugger does have sufficient information to deal with this and that would be the right place to deal with the issue.


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