[PATCH] D24977: [CUDA] Declare our __device__ math functions in the same inline namespace as our standard library.

2016-09-27 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, cfe-commits. Currently we declare our inline __device__ math functions in namespace std. But libstdc++ and libc++ declare these functions in an inline namespace inside namespace std. We need to match

[PATCH] D24978: [CUDA] Rename cuda_builtin_vars.h to __clang_cuda_builtin_vars.h.

2016-09-27 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Herald added subscribers: mgorny, beanz. This matches the idiom we use for our other CUDA wrapper headers. https://reviews.llvm.org/D24978 Files: clang/lib/Frontend/CompilerInvocation.cpp

[PATCH] D24975: [CUDA] Add #pragma clang force_cuda_host_device_{begin, end} pragmas.

2016-09-27 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added subscribers: cfe-commits, jhen, tra. These cause us to consider all functions in-between to be __host__ __device__. You can nest these pragmas; you just can't have more 'end's than 'begin's.

Re: [PATCH] D9168: [NVPTX] Check if callsite is defined when computing argument allignment

2016-09-20 Thread Justin Lebar via cfe-commits
jlebar added a comment. > I was not able to figure out how to comandeer a revision, so i just went > ahead and pushed it. Under "leap into action", one of the options is to commandeer the revision. https://reviews.llvm.org/D9168 ___ cfe-commits

Re: [PATCH] D9168: [NVPTX] Check if callsite is defined when computing argument allignment

2016-09-20 Thread Justin Lebar via cfe-commits
jlebar added a subscriber: jlebar. jlebar added a comment. FWIW I have run into this in the past and just not managed to muster up the energy to fix it. So, thank you! https://reviews.llvm.org/D9168 ___ cfe-commits mailing list

Re: [PATCH] D24640: [CUDA] Don't try to run sanitizers on NVPTX.

2016-09-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281680: [CUDA] Don't try to run sanitizers on NVPTX. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D24640?vs=71572=71573#toc Repository: rL LLVM

r281680 - [CUDA] Don't try to run sanitizers on NVPTX.

2016-09-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Sep 15 18:44:13 2016 New Revision: 281680 URL: http://llvm.org/viewvc/llvm-project?rev=281680=rev Log: [CUDA] Don't try to run sanitizers on NVPTX. Summary: Sanitizers aren't supported on NVPTX -- don't try to run them. This lets you e.g. pass -fsanitize=address and get

Re: [PATCH] D24590: [test-suite] [CUDA] Update README.

2016-09-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281552: [test-suite] [CUDA] Update README. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D24590?vs=71445=71457#toc Repository: rL LLVM https://reviews.llvm.org/D24590

Re: [PATCH] D24590: [test-suite] [CUDA] Update README.

2016-09-14 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. Will add. Thank you for the reviews! https://reviews.llvm.org/D24590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D24581: [CUDA] Add test checking our ability to take a function pointer to a __global__ function on the host side.

2016-09-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281543: [CUDA] Add test checking our ability to take a function pointer to a… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D24581?vs=71423=71446#toc Repository: rL LLVM

r281543 - [CUDA] Add test checking our ability to take a function pointer to a __global__ function on the host side.

2016-09-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Sep 14 16:50:11 2016 New Revision: 281543 URL: http://llvm.org/viewvc/llvm-project?rev=281543=rev Log: [CUDA] Add test checking our ability to take a function pointer to a __global__ function on the host side. Summary: This functionality is used by Thrust. Reviewers:

r281544 - [CUDA] Make __clang_cuda_cmath.h compatible with libc++.

2016-09-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Sep 14 16:50:14 2016 New Revision: 281544 URL: http://llvm.org/viewvc/llvm-project?rev=281544=rev Log: [CUDA] Make __clang_cuda_cmath.h compatible with libc++. Summary: We need to add a bunch more "using"s, which weren't necessary with libstdc++. Once this is in I can

[PATCH] D24590: [test-suite] [CUDA] Update README.

2016-09-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Fix typo (s/Externals/External/), and mention cuda-tests-simple. https://reviews.llvm.org/D24590 Files: External/CUDA/README Index: External/CUDA/README

[PATCH] D24581: [CUDA] Add test checking our ability to take a function pointer to a __global__ function on the host side.

2016-09-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. This functionality is used by Thrust. https://reviews.llvm.org/D24581 Files: clang/test/SemaCUDA/reference-to-kernel-fn.cu Index: clang/test/SemaCUDA/reference-to-kernel-fn.cu

[PATCH] D24573: [CUDA] Do a better job at detecting wrong-side calls.

2016-09-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added subscribers: tra, cfe-commits. Move CheckCUDACall from ActOnCallExpr and BuildDeclRefExpr to DiagnoseUseOfDecl. This lets us catch some edge cases we were missing, specifically around class operators. This necessitates

[PATCH] D24571: [CUDA] Disallow overloading destructors.

2016-09-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added subscribers: tra, cfe-commits. We'd attempted to allow this, but turns out we were doing a very bad job. :) Making this work properly would be a giant change in clang. For example, we'd need to make

Re: [PATCH] D24522: [CUDA] Do not merge CUDA target attributes.

2016-09-13 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Yay, this is great. Comment at: test/SemaCUDA/target_attr_inheritance.cu:4 @@ +3,3 @@ +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target +

Re: [PATCH] D24407: [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.

2016-09-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281089: [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D24407?vs=70857=70895#toc Repository: rL LLVM

r281089 - [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.

2016-09-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Sep 9 15:35:43 2016 New Revision: 281089 URL: http://llvm.org/viewvc/llvm-project?rev=281089=rev Log: [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device. Summary: This fixes a bug where we were unable to compile the following CUDA file with libstdc++

[PATCH] D24407: [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.

2016-09-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, cfe-commits. This fixes a bug where we were unable to compile the following CUDA file with libstdc++ (didn't try libc++): #include void foo() { std::shared_future x; } The problem is that only

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-18 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL279140: [CUDA] Improve handling of math functions. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23627?vs=68427=68600#toc Repository: rL LLVM

r279140 - [CUDA] Improve handling of math functions.

2016-08-18 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Aug 18 15:43:13 2016 New Revision: 279140 URL: http://llvm.org/viewvc/llvm-project?rev=279140=rev Log: [CUDA] Improve handling of math functions. Summary: A bunch of related changes here to our CUDA math headers. - The second arg to nexttoward is a double (well,

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-18 Thread Justin Lebar via cfe-commits
jlebar added a comment. These changes have always been kind of scary. tra tested this against Thrust all combinations of CUDA 7.0/7.5, c++98/11, libc++/libstdc++{4.8.5/4.9.3,5.3.0}. So we should be good here. I hope. https://reviews.llvm.org/D23627

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133 @@ -122,8 +124,11 @@ __DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); } -__DEVICE__ float nexttoward(float __from, float __to) { +__DEVICE__ float

[PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. A bunch of related changes here to our CUDA math headers. - The second arg to nexttoward is a double (well, technically, long double, but we don't have that), not a float. - Add a

Re: [PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278759: [CUDA] Raise an error if a wrong-side call is codegen'ed. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23242?vs=67378=68103#toc Repository: rL LLVM

r278759 - [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Aug 15 18:00:49 2016 New Revision: 278759 URL: http://llvm.org/viewvc/llvm-project?rev=278759=rev Log: [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

Re: [PATCH] D23526: [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-15 Thread Justin Lebar via cfe-commits
jlebar added a comment. Wow, I have no idea if this is right. I can try to figure it out, but if sfantao can review, that's easier. Comment at: test/Driver/cuda-bindings.cu:10 @@ +9,3 @@ +// way. Instead we check whether we've generated a permanent name on +// device side

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278735: Add the notion of deferred diagnostics. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23241?vs=68063=68073#toc Repository: rL LLVM https://reviews.llvm.org/D23241

Re: [PATCH] D23341: [CUDA] Include CUDA headers before anything else.

2016-08-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278734: [CUDA] Include CUDA headers before anything else. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23341?vs=67439=68072#toc Repository: rL LLVM

Re: [PATCH] D23340: [CUDA] Fix CUDA install version parsing.

2016-08-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278733: [CUDA] Fix CUDA install version parsing. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23340?vs=67438=68071#toc Repository: rL LLVM

r278734 - [CUDA] Include CUDA headers before anything else.

2016-08-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Aug 15 15:38:52 2016 New Revision: 278734 URL: http://llvm.org/viewvc/llvm-project?rev=278734=rev Log: [CUDA] Include CUDA headers before anything else. Summary: There's no point to --cuda-path if we then go and include /usr/include first. And if you install the right

r278735 - Add the notion of deferred diagnostics.

2016-08-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Aug 15 15:38:56 2016 New Revision: 278735 URL: http://llvm.org/viewvc/llvm-project?rev=278735=rev Log: Add the notion of deferred diagnostics. Summary: This patch lets you create diagnostics that are emitted if and only if a particular FunctionDecl is codegen'ed. This

r278733 - [CUDA] Fix CUDA install version parsing.

2016-08-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Aug 15 15:38:48 2016 New Revision: 278733 URL: http://llvm.org/viewvc/llvm-project?rev=278733=rev Log: [CUDA] Fix CUDA install version parsing. Summary: getAsInteger returns true on error. Oops. No test because the behavior at the moment is identical with or without

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-15 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 68063. jlebar added a comment. Move deferred diags storage into ASTContext. https://reviews.llvm.org/D23241 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/CodeGen/CodeGenModule.cpp

Re: [PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-11 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:62 @@ -60,2 +61,3 @@ llvm::ConstantInt::get(SizeTy, 0)}; -auto ConstStr = CGM.GetAddrOfConstantCString(Str, Name.c_str()); +auto ConstStr = CGM.GetAddrOfConstantCString(Str,

Re: [PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278194: [CUDA] Add __device__ overloads for placement new and delete. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23239?vs=67282=67447#toc Repository: rL LLVM

Re: [PATCH] D23240: [CUDA] Print a "previous-decl" note when calling an illegal member fn.

2016-08-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278195: [CUDA] Print a "previous-decl" note when calling an illegal member fn. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23240?vs=67081=67448#toc Repository: rL LLVM

Re: [PATCH] D23335: [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278196: [CUDA] Reject calls to __device__ functions from host variable global… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23335?vs=67435=67449#toc Repository: rL LLVM

r278196 - [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 20:09:21 2016 New Revision: 278196 URL: http://llvm.org/viewvc/llvm-project?rev=278196=rev Log: [CUDA] Reject calls to __device__ functions from host variable global initializers. Reviewers: tra Subscribers: cfe-commits Differential Revision:

r278193 - [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 20:09:11 2016 New Revision: 278193 URL: http://llvm.org/viewvc/llvm-project?rev=278193=rev Log: [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC Summary: I want to reuse "CheckCUDAFoo" in a later patch. Also, I think IsAllowedCUDACall gets the point across

r278192 - [Diag] Fix idiom in comment: "on the lam", not "on the lamb".

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 20:09:07 2016 New Revision: 278192 URL: http://llvm.org/viewvc/llvm-project?rev=278192=rev Log: [Diag] Fix idiom in comment: "on the lam", not "on the lamb". Modified: cfe/trunk/lib/Basic/Diagnostic.cpp Modified: cfe/trunk/lib/Basic/Diagnostic.cpp URL:

r278194 - [CUDA] Add __device__ overloads for placement new and delete.

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 20:09:14 2016 New Revision: 278194 URL: http://llvm.org/viewvc/llvm-project?rev=278194=rev Log: [CUDA] Add __device__ overloads for placement new and delete. Summary: Previously these sort of worked because they didn't end up resulting in calls at the ptx layer.

r278195 - [CUDA] Print a "previous-decl" note when calling an illegal member fn.

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 20:09:18 2016 New Revision: 278195 URL: http://llvm.org/viewvc/llvm-project?rev=278195=rev Log: [CUDA] Print a "previous-decl" note when calling an illegal member fn. Summary: When we emit err_ref_bad_target, we should emit a "'method' declared here" note. We

Re: [PATCH] D23238: [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC

2016-08-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278193: [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D23238?vs=67079=67446#toc Repository: rL LLVM

r278183 - [CUDA] Minor comment nits.

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 19:40:43 2016 New Revision: 278183 URL: http://llvm.org/viewvc/llvm-project?rev=278183=rev Log: [CUDA] Minor comment nits. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL:

r278184 - [CUDA] Fix out-of-date comment.

2016-08-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Aug 9 19:40:46 2016 New Revision: 278184 URL: http://llvm.org/viewvc/llvm-project?rev=278184=rev Log: [CUDA] Fix out-of-date comment. LangOpts.CUDADisableTargetCallChecks no longer exists (it's effectively always true now). Modified:

[PATCH] D23341: [CUDA] Include CUDA headers before anything else.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: Prazek, cfe-commits. There's no point to --cuda-path if we then go and include /usr/include first. And if you install the right packages, Ubuntu will install (very old) CUDA headers there.

[PATCH] D23340: [CUDA] Fix CUDA install version parsing.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: Prazek, cfe-commits. getAsInteger returns true on error. Oops. No test because the behavior at the moment is identical with or without this change. https://reviews.llvm.org/D23340 Files:

Re: [PATCH] D23335: [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 67435. jlebar marked an inline comment as done. jlebar added a comment. Test tweak per review. https://reviews.llvm.org/D23335 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDecl.cpp

Re: [PATCH] D23335: [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang/test/SemaCUDA/global-initializers-host.cu:2 @@ +1,3 @@ +// RUN: %clang_cc1 %s --std=c++11 -triple x86_64-linux-unknown -emit-llvm -o - -verify + +#include "Inputs/cuda.h" tra wrote: > I'd add the same comment as in

[PATCH] D23335: [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D23335 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDecl.cpp clang/test/SemaCUDA/call-device-fn-from-host.cu

Re: [PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. > Hm, these seem completely broken, before and after this patch. I'll handle it > separately if that's OK. https://reviews.llvm.org/D23335. The device side equivalent works afaict (and is very well-tested). https://reviews.llvm.org/D23242

Re: [PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 67378. jlebar added a comment. Address review comments. Also swap the two tests -- I had the wrong names on them. https://reviews.llvm.org/D23242 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaDeclCXX.cpp

Re: [PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar marked 3 inline comments as done. jlebar added a comment. > Should be add few tests for calling device functions from host-side global > initializers? Perhaps for device->host, too, as there may be unexpected > interplay with constructor emptiness checks. Hm, these seem completely

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. Reid, I'd still like you to have a look at this one if you don't mind, since it's outside my and Art's core competencies. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2886 @@ +2885,3 @@ + // Check if this function has diagnostics that should be

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 67367. jlebar marked an inline comment as done. jlebar added a comment. Address review comments, and don't abort codegen'ing a function if it has only deferred warnings -- check specifically for errors. https://reviews.llvm.org/D23241 Files:

Re: [PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-08 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D23239#508863, @tra wrote: > I think we need to add `noexcept` for these in c++11. Argh, you are completely right. Thank you for the review. https://reviews.llvm.org/D23239 ___ cfe-commits

Re: [PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-08 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 67282. jlebar added a comment. Add noexcept. https://reviews.llvm.org/D23239 Files: clang/lib/Headers/__clang_cuda_runtime_wrapper.h Index: clang/lib/Headers/__clang_cuda_runtime_wrapper.h

[PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rnk. jlebar added a subscriber: cfe-commits. 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,

[PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. This patch lets you create diagnostics that are emitted if and only if a particular FunctionDecl is codegen'ed. This is necessary for CUDA, where some constructs -- e.g. calls from host+device

[PATCH] D23240: [CUDA] Print a "previous-decl" note when calling an illegal member fn.

2016-08-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. When we emit err_ref_bad_target, we should emit a "'method' declared here" note. We already do so in most places, just not in BuildCallToMemberFunction. https://reviews.llvm.org/D23240 Files:

[PATCH] D23238: [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC

2016-08-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. I want to reuse "CheckCUDAFoo" in a later patch. Also, I think IsAllowedCUDACall gets the point across more clearly. https://reviews.llvm.org/D23238 Files: clang/include/clang/Sema/Sema.h

[PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Previously these sort of worked because they didn't end up resulting in calls at the ptx layer. But I'm adding stricter checks that break placement new without these changes.

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. > Restore assertions for presence of -march flag. We don't need an explicit assertion in TranslateArgs? Comment at: lib/Driver/Driver.cpp:1412 @@ +1411,3 @@ +

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-01 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4834 @@ -4831,2 +4833,3 @@ +getDriver().Diag(diag::err_drv_cuda_nvptx_host); } return DAL; IRL we talked about putting an assert() here and bailing out earlier. Does that not work?

Re: [PATCH] D23037: [CUDA] Fix libdevice selection.

2016-08-01 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4773 @@ +4772,3 @@ + StringRef GpuArch = + DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20"); + std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch); Hm. I

Re: [PATCH] D23037: [CUDA] Fix libdevice selection.

2016-08-01 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4773 @@ +4772,3 @@ + StringRef GpuArch = + DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20"); + std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch); I *think*

r277113 - [Typo police] s/proccess/process/, s/auxiliary/auxilliary/.

2016-07-28 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jul 29 00:26:58 2016 New Revision: 277113 URL: http://llvm.org/viewvc/llvm-project?rev=277113=rev Log: [Typo police] s/proccess/process/, s/auxiliary/auxilliary/. Modified: cfe/trunk/include/clang/AST/Decl.h Modified: cfe/trunk/include/clang/AST/Decl.h URL:

[clang-tools-extra] r277113 - [Typo police] s/proccess/process/, s/auxiliary/auxilliary/.

2016-07-28 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jul 29 00:26:58 2016 New Revision: 277113 URL: http://llvm.org/viewvc/llvm-project?rev=277113=rev Log: [Typo police] s/proccess/process/, s/auxiliary/auxilliary/. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified:

Re: [PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276927: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D22879?vs=65800=65824#toc Repository: rL

r276927 - [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 27 17:36:21 2016 New Revision: 276927 URL: http://llvm.org/viewvc/llvm-project?rev=276927=rev Log: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment. Summary: Before this patch, we computed the

r276925 - Don't crash when generating code for __attribute__((naked)) member functions.

2016-07-27 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 27 17:04:24 2016 New Revision: 276925 URL: http://llvm.org/viewvc/llvm-project?rev=276925=rev Log: Don't crash when generating code for __attribute__((naked)) member functions. Summary: Previously this crashed inside EmitThisParam(). There should be no prelude for

Re: [PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/CodeGenCUDA/kernel-args-alignment.cu:1-2 @@ +1,3 @@ +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + rnk wrote: > Typically clang doesn't need a registered backend for a target to generate

Re: [PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 65800. jlebar added a comment. Remove REQUIRES lines. https://reviews.llvm.org/D22879 Files: lib/CodeGen/CGCUDABuiltin.cpp lib/CodeGen/CGCUDANV.cpp test/CodeGenCUDA/kernel-args-alignment.cu Index: test/CodeGenCUDA/kernel-args-alignment.cu

[PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. Before this patch, we computed the offsets in memory of args passed to GPU kernel functions by throwing all of the args into an LLVM struct. clang emits packed llvm structs basically whenever

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D22463#495211, @vladisld wrote: > In https://reviews.llvm.org/D22463#494828, @jlebar wrote: > > > I think the general feeling is that most of us (myself included) would > > rather not learn a new tool if there's a simpler >alternative, such as

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D22463#494568, @vladisld wrote: > Have the alternatives to sub-modules and monolithic repository been discussed > ? Hi, Vlad. Please see the ongoing thread in llvm-dev, entitled "[RFC] One or many git repositories?". Tools such as

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-20 Thread Justin Lebar via cfe-commits
jlebar added a comment. Hi, Renato. Just to explain why I'm going to go forward with this RFC about a monolithic repository: From speaking with some top contributors on IRC, I have heard that they feel that the discussion of whether to move to git has been conflated with the discussion of how

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-20 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D22463#489461, @rengolin wrote: > You will not be required to use submodules at all, as we'll all use the > individual projects, like we have always been. I don't understand why people > keep going back to it. There is a key use case that

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-19 Thread Justin Lebar via cfe-commits
jlebar added a comment. FYI after talking to Chandler, I'm going to write up a separate proposal for the one-repository thing and send it to the list tomorrow. The suggestion was that this phabricator thread isn't the right place to have this discussion. https://reviews.llvm.org/D22463

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-19 Thread Justin Lebar via cfe-commits
jlebar added a subscriber: jlebar. jlebar added a comment. I'm sure you all have thought about this more than I have, and I apologize if this has been brought up before because I haven't been following the thread closely. But I am not convinced by this document that using subrepositories

Re: [PATCH] D21913: [CUDA] Add additional testcases for EraseUnwantedCUDAMatches.

2016-07-12 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275232: [CUDA] Add additional testcases for EraseUnwantedCUDAMatches. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21913?vs=62445=63750#toc Repository: rL LLVM

Re: [PATCH] D21914: [CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.

2016-07-12 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275233: [CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21914?vs=62446=63751#toc Repository: rL LLVM

r275233 - [CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.

2016-07-12 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jul 12 18:23:13 2016 New Revision: 275233 URL: http://llvm.org/viewvc/llvm-project?rev=275233=rev Log: [CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches. Summary: Bug pointed out by Benjamin Kramer in r264008. I think the bug is benign because by

Re: [PATCH] D21912: [CUDA] Don't assume that destructors can't be overloaded.

2016-07-12 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275231: [CUDA] Don't assume that destructors can't be overloaded. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21912?vs=62444=63749#toc Repository: rL LLVM

r275231 - [CUDA] Don't assume that destructors can't be overloaded.

2016-07-12 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jul 12 18:23:01 2016 New Revision: 275231 URL: http://llvm.org/viewvc/llvm-project?rev=275231=rev Log: [CUDA] Don't assume that destructors can't be overloaded. Summary: You can overload a destructor in CUDA, and SemaOverload needs to be tweaked not to crash when it sees

r274782 - [CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.

2016-07-07 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jul 7 13:24:28 2016 New Revision: 274782 URL: http://llvm.org/viewvc/llvm-project?rev=274782=rev Log: [CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/. Fix build breakage. Modified: cfe/trunk/lib/Driver/ToolChains.cpp cfe/trunk/lib/Driver/Tools.cpp

Re: [PATCH] D21912: [CUDA] Don't assume that destructors can't be overloaded.

2016-07-07 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping http://reviews.llvm.org/D21912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21869: [CUDA] Check that our CUDA install supports the requested architectures.

2016-07-07 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274781: [CUDA] Check that our CUDA install supports the requested architectures. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21869?vs=63094=63100#toc Repository: rL LLVM

r274781 - [CUDA] Check that our CUDA install supports the requested architectures.

2016-07-07 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jul 7 13:17:52 2016 New Revision: 274781 URL: http://llvm.org/viewvc/llvm-project?rev=274781=rev Log: [CUDA] Check that our CUDA install supports the requested architectures. Summary: Raise an error if you're using a CUDA installation that's too old for the requested

r274780 - [CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.

2016-07-07 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jul 7 13:15:03 2016 New Revision: 274780 URL: http://llvm.org/viewvc/llvm-project?rev=274780=rev Log: [CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads. The builtin was renamed in r274770. But __syncthreads is part of our user-facing API, so we need to keep

Re: [PATCH] D21869: [CUDA] Check that our CUDA install supports the requested architectures.

2016-07-07 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 63094. jlebar marked 3 inline comments as done. jlebar added a comment. Address review comments. http://reviews.llvm.org/D21869 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains.cpp

r274713 - [CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.

2016-07-06 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 6 20:06:59 2016 New Revision: 274713 URL: http://llvm.org/viewvc/llvm-project?rev=274713=rev Log: [CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp. Some compilers are too dumb to realize that the switch statement covers all cases. (Don't

Re: [PATCH] D21869: [CUDA] Check that our CUDA install supports the requested architectures.

2016-07-06 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping. http://reviews.llvm.org/D21869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r274689 - [CUDA] Add missing namespace qualification on CudaArch in Action.cpp.

2016-07-06 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 6 16:45:44 2016 New Revision: 274689 URL: http://llvm.org/viewvc/llvm-project?rev=274689=rev Log: [CUDA] Add missing namespace qualification on CudaArch in Action.cpp. Fix build breakage with MSVC. Modified: cfe/trunk/lib/Driver/Action.cpp Modified:

Re: [PATCH] D21867: [CUDA] Add utility functions for dealing with CUDA versions / architectures.

2016-07-06 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274681: [CUDA] Add utility functions for dealing with CUDA versions / architectures. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21867?vs=62409=62975#toc Repository: rL

Re: [PATCH] D21868: [CUDA] Rename member variables in CudaInstallationDetector.

2016-07-06 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274682: [CUDA] Rename member variables in CudaInstallationDetector. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21868?vs=62300=62976#toc Repository: rL LLVM

r274682 - [CUDA] Rename member variables in CudaInstallationDetector.

2016-07-06 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 6 16:21:43 2016 New Revision: 274682 URL: http://llvm.org/viewvc/llvm-project?rev=274682=rev Log: [CUDA] Rename member variables in CudaInstallationDetector. Summary: Remove the "Cuda" prefix from these variables -- it's clear that they related to CUDA given their

r274681 - [CUDA] Add utility functions for dealing with CUDA versions / architectures.

2016-07-06 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jul 6 16:21:39 2016 New Revision: 274681 URL: http://llvm.org/viewvc/llvm-project?rev=274681=rev Log: [CUDA] Add utility functions for dealing with CUDA versions / architectures. Summary: Currently our handling of CUDA architectures is scattered all around clang. This

<    1   2   3   4   5   6   7   8   9   >