[HIP] Support __managed__ attributeThis patch implements codegen for __managed__ variable attribute for HIP.Diagnostics will be added later.Differential Revision: https://reviews.llvm.org/D94814
[CUDA][HIP] Let lambda be host device by defaultThis patch let lambda be host device by default and adds diagnostics forcapturing host variable by reference in device lambda.Differential Revisio
[CUDA][HIP] Let lambda be host device by defaultThis patch let lambda be host device by default and adds diagnostics forcapturing host variable by reference in device lambda.Differential Revision: https://reviews.llvm.org/D78655
show more ...
[CUDA] add support for the new kernel launch API in CUDA-9.2+.Instead of calling CUDA runtime to arrange function arguments,the new API constructs arguments in a local array and the kernelsare la
[CUDA] add support for the new kernel launch API in CUDA-9.2+.Instead of calling CUDA runtime to arrange function arguments,the new API constructs arguments in a local array and the kernelsare launched with __cudaLaunchKernel().The old API has been deprecated and is expected to go awayin the next CUDA release.Differential Revision: https://reviews.llvm.org/D57488llvm-svn: 352799
[CUDA] Do a better job at detecting wrong-side calls.Summary:Move CheckCUDACall from ActOnCallExpr and BuildDeclRefExpr toDiagnoseUseOfDecl. This lets us catch some edge cases we were missing,s
[CUDA] Do a better job at detecting wrong-side calls.Summary:Move CheckCUDACall from ActOnCallExpr and BuildDeclRefExpr toDiagnoseUseOfDecl. This lets us catch some edge cases we were missing,specifically around class operators.This necessitates a few other changes: - Avoid emitting duplicate deferred diags in CheckCUDACall. Previously we'd carefully placed our call to CheckCUDACall such that it would only ever run once for a particular callsite. But now this isn't the case. - Emit deferred diagnostics from a template specialization/instantiation's primary template, in addition to from the specialization/instantiation itself. DiagnoseUseOfDecl ends up putting the deferred diagnostics on the template, rather than the specialization, so we need to check both.Reviewers: rsmithSubscribers: cfe-commits, traDifferential Revision: https://reviews.llvm.org/D24573llvm-svn: 283637
[CUDA] Raise an error if a wrong-side call is codegen'ed.Summary:Some function calls in CUDA are allowed to appear insemantically-correct programs but are an error if they're evercodegen'ed. Sp
[CUDA] Raise an error if a wrong-side call is codegen'ed.Summary:Some function calls in CUDA are allowed to appear insemantically-correct programs but are an error if they're evercodegen'ed. Specifically, a host+device function may call a hostfunction, but it's an error if such a function is ever codegen'ed indevice mode (and vice versa).Previously, clang made no attempt to catch these errors. For the mostpart, they would be caught by ptxas, and reported as "call to unknownfunction 'foo'".Now we catch these errors and report them the same as we report otherillegal 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 werepreviously disallowed (e.g. calls from a host to a device function).Previously, we'd catch disallowed calls fairly early, before doingadditional semantic checking e.g. of the call's arguments. Now we catchthese illegal calls at the very end of our semantic checks, so we'llonly emit a "illegal CUDA call" error if the call is otherwisewell-formed.Reviewers: tra, rnkSubscribers: cfe-commitsDifferential Revision: https://reviews.llvm.org/D23242llvm-svn: 278759
Avoid depending on test inputes that aren't in InputsSome people have weird CI systems that run each test subdirectoryindependently without access to other parallel trees.Unfortunately, this mea
Avoid depending on test inputes that aren't in InputsSome people have weird CI systems that run each test subdirectoryindependently without access to other parallel trees.Unfortunately, this means we have to suffer some duplication until Artcan sort out how to share these types.llvm-svn: 270164
[CUDA] Make unattributed constexpr functions implicitly host+device.With this patch, by a constexpr function is implicitly host+deviceunless: a) it's a variadic function (variadic functions are
[CUDA] Make unattributed constexpr functions implicitly host+device.With this patch, by a constexpr function is implicitly host+deviceunless: a) it's a variadic function (variadic functions are not allowed on the device side), or b) it's preceeded by a __device__ overload in a system header.The restriction on overloading __host__ __device__ functions on thebasis of their CUDA attributes remains in place, but we use (b) to allowus to define __device__ overloads for constexpr functions in cmath,which would otherwise be __host__ __device__ and thus not overloadable.You can disable this behavior with -fno-cuda-host-device-constexpr.Reviewers: tra, rnk, rsmithSubscribers: cfe-commitsDifferential Revision: http://reviews.llvm.org/D18380llvm-svn: 264964
[CUDA] Report an error if code tries to mix incompatible CUDA attributes.Summary: Thanks to jhen for helping me figure this out.Reviewers: tra, echristoSubscribers: jhenDifferential Revision:
[CUDA] Report an error if code tries to mix incompatible CUDA attributes.Summary: Thanks to jhen for helping me figure this out.Reviewers: tra, echristoSubscribers: jhenDifferential Revision: http://reviews.llvm.org/D16129llvm-svn: 257554
Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.llvm-svn: 207453