Go to file
Justin Lebar 18e2d82297 [CUDA] Raise an error if a wrong-side call is codegen'ed.
Summary:
Some function calls in CUDA are allowed to appear in
semantically-correct programs but are an error if they're ever
codegen'ed.  Specifically, a host+device function may call a host
function, but it's an error if such a function is ever codegen'ed in
device mode (and vice versa).

Previously, clang made no attempt to catch these errors.  For the most
part, they would be caught by ptxas, and reported as "call to unknown
function 'foo'".

Now we catch these errors and report them the same as we report other
illegal calls (e.g. a call from a host function to a device function).

This has a small change in error-message behavior for calls that were
previously disallowed (e.g. calls from a host to a device function).
Previously, we'd catch disallowed calls fairly early, before doing
additional semantic checking e.g. of the call's arguments.  Now we catch
these illegal calls at the very end of our semantic checks, so we'll
only emit a "illegal CUDA call" error if the call is otherwise
well-formed.

Reviewers: tra, rnk

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23242

llvm-svn: 278759
2016-08-15 23:00:49 +00:00
clang [CUDA] Raise an error if a wrong-side call is codegen'ed. 2016-08-15 23:00:49 +00:00
clang-tools-extra [Documentation] Improve checks groups descriptions in clang-tidy/index.rst 2016-08-15 17:44:29 +00:00
compiler-rt [CMake] Renaming test variable to be consistent 2016-08-15 20:12:43 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Make min follow the OCL 1.0 specs 2016-07-25 22:36:22 +00:00
libcxx libcxx: Fix path.compare.pass expected result 2016-08-15 21:24:50 +00:00
libcxxabi Fix ASAN failures in the demangler 2016-08-13 00:02:33 +00:00
libunwind Allow building both shared and static library 2016-08-08 22:55:48 +00:00
lld [ELF] Linkerscript: fix bug in assignOffsets (check Sym for non-null) 2016-08-15 09:19:51 +00:00
lldb Fix expression evaluation with operator new 2016-08-15 14:32:32 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm Don't use %llc_dwarf with -mtriple, they don't combine 2016-08-15 22:54:26 +00:00
openmp Fixes for hierarchical barrier (possible hang if team size changed). 2016-08-11 13:04:00 +00:00
parallel-libs [StreamExecutor] Add DeviceMemory and kernel arg packing 2016-08-08 16:45:19 +00:00
polly [ScopDetect] Do not assert in case of AddRecs with non-constant start expression 2016-08-15 20:59:30 +00:00