[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGacb6f80d96b7: [CUDA][HIP] Fix overloading resolution (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D80450?vs=308515&id=309044#toc Repo

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D80450#2428631 , @yaxunl wrote: >> Also, naming. `-ffix-overload-resolution` is rather non-specific. I didn't >> mean to use it literally. The problem is that I can't think of a good >> descriptive name for what we do here. `-fgp

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added a comment. In D80450#2426507 , @tra wrote: > LGTM. > > I'd suggest adding more details on the background of this change to the > commit log (point to the comment in the `isBetterOverloadCandidate` ?) a

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-01 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. I'd suggest adding more details on the background of this change to the commit log (point to the comment in the `isBetterOverloadCandidate` ?) and outline the intention to enable the new way to do overloading after some soak time. Also, n

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 308515. yaxunl edited the summary of this revision. yaxunl added a comment. Herald added subscribers: dexonsmith, dang. Add -ffix-overload-resolution and fix a regression. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80450/new/ https://reviews.llvm.

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-diags is on. In both cases the diagnostic sh

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D80450#2423706 , @tra wrote: > SGTM. I'll check how the patch fares on our CUDA code. Please hold on. I just found a regression due to old behavior not fully recovered in certain case. I will update the patch for fixing the reg

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-diags is on. In both cases the diagnostic sh

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D80450#2418775 , @yaxunl wrote: > For the call `ag(e)`. There are two candidates: > > 1. `ag` in namespace `b`. The function arguments can match. However it is a > host function, therefore is a wrong-sided candidate and not viable.

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 308032. yaxunl retitled this revision from "[CUDA][HIP] Fix implicit HD function resolution" to "[CUDA][HIP] Fix HD function resolution". yaxunl edited the summary of this revision. yaxunl added a comment. If -fgpu-defer-diags is off, keep original behavior.