[PATCH] D68578: [HIP] Fix device stub name
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 11:43:45 PST 2019
yaxunl added a comment.
In D68578#1737419 <https://reviews.llvm.org/D68578#1737419>, @rjmccall wrote:
> In D68578#1737415 <https://reviews.llvm.org/D68578#1737415>, @yaxunl wrote:
>
> > In D68578#1737351 <https://reviews.llvm.org/D68578#1737351>, @rjmccall wrote:
> >
> > > Distinguishing between multiple symbols associated with the same source-level declaration is the purpose of the GlobalDecl abstraction.
> >
> >
> > It seems GlobalDecl is just a wrapper for concrete Decl's
>
>
> It's a `Decl` plus a discriminator which is required for certain kinds of declaration. See e.g. `GlobalDecl(const CXXConstructorDecl *D, CXXCtorType Type)`. `GlobalDecl` asserts if you try to construct it using `GlobalDecl(FunctionDecl*)` with a constructor/destructor declaration; we could similarly make that forbid construction with a kernel and then require code to use a `GlobalDecl` constructor that passes down whether it's the kernel or the stub that's being requested.
>
> John.
In host compilation, we do not need to differentiate device function or stub function except for the mangler. Currently the mangler does not know about GlobalDecl. If we let the mangler to mangle a function based on whether it is a GlobalDecl or FunctionDecl, we still need to modify the mangler, and the change will be similar to the current approach.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68578/new/
https://reviews.llvm.org/D68578
More information about the cfe-commits
mailing list