This is an archive of the discontinued LLVM Phabricator instance.

[CUDA][NFCI] Use unqualified lookup for math functions
AbandonedPublic

Authored by jdoerfert on Apr 1 2020, 1:20 PM.

Details

Reviewers
tra
Summary

The other macro uses a unqualified lookup already and the qualified one
will cause problems in the OpenMP overlay.

Depends on D77238.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 1 2020, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 1:20 PM
Herald added subscribers: bollu, yaxunl. · View Herald Transcript
tra added a subscriber: jlebar.Apr 1 2020, 2:20 PM

The other macro uses a unqualified lookup already and the qualified one
will cause problems in the OpenMP overlay.

There's a bit of inconsitency here. While __CUDA_CLANG_FN_INTEGER_OVERLOAD_2 indeed uses unqualified lookup, pretty much all other functions use qualified global scope lookups, which, I believe is correct, as we want to use the functions defined by CUDA headers there.

@jlebar -- WDYT?

jdoerfert abandoned this revision.Apr 1 2020, 2:23 PM
In D77239#1955720, @tra wrote:

The other macro uses a unqualified lookup already and the qualified one
will cause problems in the OpenMP overlay.

There's a bit of inconsitency here. While __CUDA_CLANG_FN_INTEGER_OVERLOAD_2 indeed uses unqualified lookup, pretty much all other functions use qualified global scope lookups, which, I believe is correct, as we want to use the functions defined by CUDA headers there.

@jlebar -- WDYT?

It turns out I can disable this entire code region for OpenMP (or have to for c++17 I tihnk), so I'll abandon this revision and you make it consistent in the way that fits your need :)