llvm-project/clang/test/CodeGenCUDA
Artem Belevich 186091094a [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

llvm-svn: 260697
2016-02-12 18:29:18 +00:00
..
Inputs [CUDA] Make printf work. 2016-01-23 21:28:14 +00:00
address-spaces.cu [CUDA] Allow trivial constructors as initializer for __shared__ variables. 2015-09-10 17:26:58 +00:00
alias.cu [CUDA] Don't generate aliases for static extern "C" functions. 2016-01-25 22:36:37 +00:00
cuda-builtin-vars.cu [cuda] Added support for CUDA built-in variables. 2015-04-21 22:14:13 +00:00
device-stub.cu [cuda] Fixed test case failure on s390x 2015-05-11 18:35:58 +00:00
device-var-init.cu [CUDA] Do not allow dynamic initialization of global device side variables. 2016-02-02 22:29:48 +00:00
device-vtable.cu [CUDA] Make vtable construction aware of host/device side of CUDA compilation. 2015-12-17 18:12:36 +00:00
filter-decl.cu [CUDA] Change initializer for CUDA device code based on CUDA documentation. 2015-08-22 05:49:28 +00:00
function-overload.cu [CUDA] Tweak attribute-based overload resolution to match nvcc behavior. 2016-02-12 18:29:18 +00:00
host-device-calls-host.cu CUDA: Add option to allow host device functions to call host functions 2015-02-24 21:45:33 +00:00
kernel-call.cu Move all CUDA testing inputs to Inputs/ subdirectory inside the tests. 2014-04-28 22:21:28 +00:00
launch-bounds.cu [cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments. 2015-04-21 22:55:54 +00:00
link-device-bitcode.cu Allow linking multiple bitcode files. 2015-10-27 17:56:59 +00:00
llvm-used.cu When generating llvm.used, we may need an addrspacecast instead of a bitcast. 2015-02-02 21:05:49 +00:00
printf-aggregate.cu [CUDA] Don't crash when trying to printf a non-scalar object. 2016-02-11 02:00:52 +00:00
printf.cu [CUDA] Generate CUDA's printf alloca in its function's entry block. 2016-01-28 23:58:28 +00:00
ptx-kernels.cu [CUDA] __global__ functions should always be visible externally. 2015-09-23 17:44:53 +00:00