diff options
author | Artem Belevich <tra@google.com> | 2016-02-12 18:29:18 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2016-02-12 18:29:18 +0000 |
commit | 2721c4d7813b4e456bc2465cb487c729074fca1d (patch) | |
tree | 35ea68b5714035e548e11530f2176e615a98d046 /CMakeLists.txt | |
parent | 8148f06ebc11112332b5c256b27a561a63b27c11 (diff) |
[CUDA] Tweak attribute-based overload resolution to match nvcc behavior.
This is an artefact of split-mode CUDA compilation that we need to
mimic. HD functions are sometimes allowed to call H or D functions. Due
to split compilation mode device-side compilation will not see host-only
function and thus they will not be considered at all. For clang both H
and D variants will become function overloads visible to
compiler. Normally target attribute is considered only if C++ rules can
not determine which function is better. However in this case we need to
ignore functions that would not be present during current compilation
phase before we apply normal overload resolution rules.
Changes:
* introduced another level of call preference to better describe
possible call combinations.
* removed WrongSide functions from consideration if the set contains
SameSide function.
* disabled H->D, D->H and G->H calls. These combinations are
not allowed by CUDA and we were reluctantly allowing them to work
around device-side calls to math functions in std namespace.
We no longer need it after r258880.
Differential Revision: http://reviews.llvm.org/D16870
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions