Re: [PATCH] D18051: [CUDA] Provide CUDA's vector types implemented using clang's vector extension.

2016-03-10 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:72 @@ -71,1 +71,3 @@ +#if defined(CUDA_VECTOR_TYPES) +// Prevent inclusion of CUDA's vector_types.h The compiler driver is responsible for enabling/disabling language

Re: [PATCH] D18051: [CUDA] Provide CUDA's vector types implemented using clang's vector extension.

2016-03-10 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:72 @@ -71,1 +71,3 @@ +#if defined(CUDA_VECTOR_TYPES) +// Prevent inclusion of CUDA's vector_types.h Hm, this is a surprising (to me) way of controlling this feature. Can we

Re: [PATCH] D17779: [CUDA] Emit host-side 'shadows' for device-side global variables

2016-03-01 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:168 @@ -163,1 +167,3 @@ +/// of global scope device-side variables generated in this module +/// with the CUDA runtime. /// \code This is kind of hard to parse. How about rephrasing to something

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-29 Thread Justin Lebar via cfe-commits
If the test shouldn't require large stack usage, should the not_ubsan, not_asan tags be removed? On Mon, Feb 29, 2016 at 9:55 PM, Justin Lebar wrote: > Works! Thank you for fixing this, and so quickly. > > On Mon, Feb 29, 2016 at 6:51 PM, Argyrios Kyrtzidis

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-29 Thread Justin Lebar via cfe-commits
Works! Thank you for fixing this, and so quickly. On Mon, Feb 29, 2016 at 6:51 PM, Argyrios Kyrtzidis wrote: > Try with r262290. > >> On Feb 29, 2016, at 6:23 PM, Argyrios Kyrtzidis wrote: >> >> Ah, I see the problem in the code, will fix shortly. >> >>>

Re: [PATCH] D17581: [CUDA] disable attribute-based overloading for __global__ functions.

2016-02-29 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. Landed in http://reviews.llvm.org/rL261778. http://reviews.llvm.org/D17581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-29 Thread Justin Lebar via cfe-commits
> Is this still an issue after r260785 ? I just sync'ed to r262268 and was able to reproduce the segfault. > Could you provide a stack trace ? $ gdb --args release/bin/c-index-test -index-file /usr/local/google/home/jlebar/code/llvm/src/tools/clang/test/Index/index-many-call-ops.cpp (gdb) run

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-29 Thread Justin Lebar via cfe-commits
Hi, I think this broke clang/test/Index/index-many-call-ops.cpp. I get a segfault due to recursive stack overflow in release builds on my linux x86-64 box when running that test -- it seems the purpose of that test is to check that we *don't* segfault. This has been broken for a while, and

Re: r261774 - Bail on compilation as soon as a job fails.

2016-02-29 Thread Justin Lebar via cfe-commits
error", with no ambiguity. On Mon, Feb 29, 2016 at 12:50 PM, David Blaikie <dblai...@gmail.com> wrote: > > > On Mon, Feb 29, 2016 at 11:19 AM, Justin Lebar via cfe-commits > <cfe-commits@lists.llvm.org> wrote: >> >> > Can you expand on this? The idea is that th

Re: r261774 - Bail on compilation as soon as a job fails.

2016-02-29 Thread Justin Lebar via cfe-commits
uss what your requirements are and if it's possible to extend > the Action / Job / Command abstractions in a way that support CUDA without > as many special cases. I happen to be in Mountain View – if you're in the > office tomorrow, maybe we could discuss this for half an hour or so in

Re: r261774 - Bail on compilation as soon as a job fails.

2016-02-28 Thread Justin Lebar via cfe-commits
orced to serialize, I think. -Justin > On Wed, Feb 24, 2016 at 4:49 PM, Justin Lebar via cfe-commits > <cfe-commits@lists.llvm.org> wrote: >> >> Author: jlebar >> Date: Wed Feb 24 15:49:28 2016 >> New Revision: 261774 >> >> URL: http://llvm.org/view

Re: [PATCH] D17313: [CUDA] Annotate all calls in CUDA device mode as convergent.

2016-02-24 Thread Justin Lebar via cfe-commits
jlebar abandoned this revision. jlebar added a comment. Subsumed by http://reviews.llvm.org/D17056. http://reviews.llvm.org/D17313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261779 - [CUDA] Mark all CUDA device-side function defs, decls, and calls as convergent.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:55:11 2016 New Revision: 261779 URL: http://llvm.org/viewvc/llvm-project?rev=261779=rev Log: [CUDA] Mark all CUDA device-side function defs, decls, and calls as convergent. Summary: This is important for e.g. the following case: void sync() {

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-24 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261779: [CUDA] Mark all CUDA device-side function defs, decls, and calls as convergent. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17056?vs=48261=48979#toc Repository:

Re: [PATCH] D17561: [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and blockDim to uint3 and dim3.

2016-02-24 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261777: [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and… (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17561?vs=48884=48978#toc Repository: rL LLVM

Re: [PATCH] D17216: Make test/Driver/output-file-cleanup.c hermetic.

2016-02-24 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261773: Make test/Driver/output-file-cleanup.c hermetic. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17216?vs=47857=48975#toc Repository: rL LLVM

Re: [PATCH] D17217: Bail on compilation as soon as a job fails.

2016-02-24 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261774: Bail on compilation as soon as a job fails. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17217?vs=47858=48976#toc Repository: rL LLVM

Re: [PATCH] D17562: [CUDA] Add hack so code which includes "curand.h" doesn't break.

2016-02-24 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261776: [CUDA] Add hack so code which includes "curand.h" doesn't break. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17562?vs=48885=48977#toc Repository: rL LLVM

r261777 - [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and blockDim to uint3 and dim3.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:49:33 2016 New Revision: 261777 URL: http://llvm.org/viewvc/llvm-project?rev=261777=rev Log: [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and blockDim to uint3 and dim3. Summary: This lets you write, e.g. uint3 a = threadIdx; uint3 b

r261773 - Make test/Driver/output-file-cleanup.c hermetic.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:49:26 2016 New Revision: 261773 URL: http://llvm.org/viewvc/llvm-project?rev=261773=rev Log: Make test/Driver/output-file-cleanup.c hermetic. Summary: It checks that certain files do and exist, so make sure that they don't exist at the beginning of the test.

r261774 - Bail on compilation as soon as a job fails.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:49:28 2016 New Revision: 261774 URL: http://llvm.org/viewvc/llvm-project?rev=261774=rev Log: Bail on compilation as soon as a job fails. Summary: (Re-land of r260448, which was reverted in r260522 due to a test failure in Driver/output-file-cleanup.c that only

r261775 - [CUDA] Don't specify exact line numbers in cuda-builtin-vars.cu.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:49:30 2016 New Revision: 261775 URL: http://llvm.org/viewvc/llvm-project?rev=261775=rev Log: [CUDA] Don't specify exact line numbers in cuda-builtin-vars.cu. This makes the test less fragile to changes to cuda_builtin_vars.h. Test-only change. Modified:

r261776 - [CUDA] Add hack so code which includes "curand.h" doesn't break.

2016-02-24 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 24 15:49:31 2016 New Revision: 261776 URL: http://llvm.org/viewvc/llvm-project?rev=261776=rev Log: [CUDA] Add hack so code which includes "curand.h" doesn't break. Summary: curand.h includes curand_mtgp32_kernel.h. In host mode, this header redefines threadIdx and

Re: [PATCH] D17217: Bail on compilation as soon as a job fails.

2016-02-24 Thread Justin Lebar via cfe-commits
jlebar added a comment. Upon further consideration, I'm going to push this with post-submit review -- the only difference from what echristo reviewed is an obvious change to output-file-cleanup.c. http://reviews.llvm.org/D17217 ___ cfe-commits

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-24 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping -- are we happy with this? http://reviews.llvm.org/D17056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17216: Make test/Driver/output-file-cleanup.c hermetic.

2016-02-24 Thread Justin Lebar via cfe-commits
jlebar added a comment. Upon further consideration, I think I'm going to push this with post-submit review, as we know this test is quite broken, and I think this change is unlikely to make the situation worse. http://reviews.llvm.org/D17216 ___

Re: [PATCH] D17561: [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and blockDim to uint3 and dim3.

2016-02-24 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Headers/cuda_builtin_vars.h:72 @@ -66,1 +71,3 @@ + // uint3). This function is defined after we pull in vector_types.h. + __attribute__((device)) operator uint3() const; private: tra wrote: > Considering that

[PATCH] D17562: [CUDA] Add hack so code which includes "curand.h" doesn't break.

2016-02-23 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, echristo. curand.h includes curand_mtgp32_kernel.h. In host mode, this header redefines threadIdx and blockDim, giving them their "proper" types of uint3 and dim3, respectively. clang has its own

[PATCH] D17561: [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and blockDim to uint3 and dim3.

2016-02-23 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, echristo. This lets you write, e.g. uint3 a = threadIdx; uint3 b = blockIdx; dim3 c = gridDim; dim3 d = blockDim; which is legal in nvcc, but was not legal in clang. The fact that e.g.

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48261. jlebar added a comment. Move code into ConstructAttributeList. Now it applies to both functions and calls. http://reviews.llvm.org/D17056 Files: lib/CodeGen/CGCall.cpp test/CodeGenCUDA/convergent.cu test/CodeGenCUDA/device-var-init.cu Index:

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D17056#355228, @jlebar wrote: > Move coded into SetLLVMFunctionAttributes (not ForDefinition). Much better. :) http://reviews.llvm.org/D17056 ___ cfe-commits mailing list

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48260. jlebar added a comment. Move coded into SetLLVMFunctionAttributes (not ForDefinition). http://reviews.llvm.org/D17056 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/convergent.cu Index: test/CodeGenCUDA/convergent.cu

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D17056#355198, @jlebar wrote: > Move code into SetLLVMFunctionAttributesForDefinition. Actually, this doesn't work -- we don't annotate __host__ __device__ void baz(); as convergent. (I ran the tests, but of course I didn't notice it

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48255. jlebar added a comment. Move code into SetLLVMFunctionAttributesForDefinition. http://reviews.llvm.org/D17056 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/convergent.cu Index: test/CodeGenCUDA/convergent.cu

Re: [PATCH] D17313: [CUDA] Annotate all calls in CUDA device mode as convergent.

2016-02-16 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48143. jlebar added a comment. Fix typo. http://reviews.llvm.org/D17313 Files: lib/CodeGen/CGCall.cpp test/CodeGenCUDA/convergent.cu test/CodeGenCUDA/device-var-init.cu Index: test/CodeGenCUDA/device-var-init.cu

[PATCH] D17313: [CUDA] Annotate all calls in CUDA device mode as convergent.

2016-02-16 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: rnk, majnemer. jlebar added subscribers: tra, cfe-commits. We need the notion of convergent functions -- which may expose convergent behavior to callers -- and convergent calls, which are calls where we would like to preserve convergent

[PATCH] D17216: Make test/Driver/output-file-cleanup.c hermetic.

2016-02-12 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rafael. jlebar added a subscriber: cfe-commits. It checks that certain files do and exist, so make sure that they don't exist at the beginning of the test. This hid a failure in r260448; to see the failure, you had to run the test with a

[PATCH] D17217: Bail on compilation as soon as a job fails.

2016-02-12 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rafael. jlebar added subscribers: tra, echristo, jhen, cfe-commits. (Re-land of r260448, which was reverted in r260522 due to a test failure in Driver/output-file-cleanup.c that only showed up in fresh builds.) Previously we attempted to be

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-02-12 Thread Justin Lebar via cfe-commits
jlebar added a comment. espindola reverted this in r260522 because of test failures in Driver/output-file-cleanup.c. The reason I didn't catch this locally is that the test is non-hermetic -- if it passed once in an objdir, this patch does not make it fail again. You have to nuke (part of)

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. Mostly comments on comments. Comment at: lib/Sema/SemaCUDA.cpp:71 @@ -70,3 +70,3 @@ // H - handled in (x) -// Preferences: b-best, f-fallback, l-last resort, n-never. +// Preferences: +:native, *:host-device, o:same side, .:wrong side, -:never. //

Re: [PATCH] D17111: [CUDA] Added --cuda-noopt-device-debug option to control ptxas' debug info generation.

2016-02-11 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. Comment at: lib/Driver/Tools.cpp:10696 @@ +10695,3 @@ +// ptxas does not accept -g option if optimization is enabled, so we ignore +// compiler's -O* options if we want debug info. +CmdArgs.push_back("-g"); Nit: ignore

r260448 - Bail on compilation as soon as a job fails.

2016-02-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 10 16:17:00 2016 New Revision: 260448 URL: http://llvm.org/viewvc/llvm-project?rev=260448=rev Log: Bail on compilation as soon as a job fails. Previously we attempted to be smart; if one job failed, we'd run all jobs that didn't depend on the failing job. Problem

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-02-10 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260448: Bail on compilation as soon as a job fails. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16514?vs=47520=47525#toc Repository: rL LLVM

[PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: majnemer, rnk. jlebar added subscribers: tra, jhen, cfe-commits. We can't do the right thing, since there's no right thing to do, but at least we can not crash the compiler. http://reviews.llvm.org/D17103 Files:

[PATCH] D17100: Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: echristo. jlebar added a subscriber: cfe-commits. Actions don't depend on the toolchain; they get bound to a particular toolchain via BindArch. No functional changes. http://reviews.llvm.org/D17100 Files: include/clang/Driver/Driver.h

Re: [PATCH] D17111: [CUDA] pass debug options to ptxas.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/Tools.cpp:10707 @@ +10706,3 @@ +// ptxas does not accept -g option if optimization is enabled, so we ignore +// compiler's -O* options if we want debug info. +CmdArgs.push_back("-g"); I think this

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. Yeah, I have no idea what's the right thing to do here. We can always pass a null pointer, that's easy. David, Reid, do you know what is the correct behavior? http://reviews.llvm.org/D17103 ___ cfe-commits mailing list

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D17103#349245, @hfinkel wrote: > In http://reviews.llvm.org/D17103#349182, @jlebar wrote: > > > Yeah, I have no idea what's the right thing to do here. We can always pass > > a null pointer, that's easy. David, Reid, do you know what is the

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 47569. jlebar added a comment. Error out with CGM.ErrorUnsupported when we receive a non-scalar arg. http://reviews.llvm.org/D17103 Files: lib/CodeGen/CGCUDABuiltin.cpp test/CodeGenCUDA/printf-aggregate.cu Index: test/CodeGenCUDA/printf-aggregate.cu

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL260479: [CUDA] Don't crash when trying to printf a non-scalar object. (authored by jlebar). Changed prior to commit:

r260478 - Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction.

2016-02-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 10 20:00:50 2016 New Revision: 260478 URL: http://llvm.org/viewvc/llvm-project?rev=260478=rev Log: Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction. Summary: Actions don't depend on the toolchain; they get bound to a particular toolchain

Re: [PATCH] D17100: Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction.

2016-02-10 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260478: Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17100?vs=47526=47571#toc Repository: rL

r260479 - [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Feb 10 20:00:52 2016 New Revision: 260479 URL: http://llvm.org/viewvc/llvm-project?rev=260479=rev Log: [CUDA] Don't crash when trying to printf a non-scalar object. Summary: We can't do the right thing, since there's no right thing to do, but at least we can not crash

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. OK, talked to Reid irl. Since this is just printf, not general varargs handling, the Simplest Thing That Could Possibly Work is to error-unsupported. Once we fix sema as described above, we can move the check there. Will update the patch, thanks everyone.

[PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: majnemer. jlebar added a subscriber: cfe-commits. This isn't a FileCheck directive; it does nothing. http://reviews.llvm.org/D17051 Files: test/CodeGenCXX/optnone-and-attributes.cpp test/CodeGenCXX/optnone-class-members.cpp

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/Modules/ModuleDebugInfo.cpp:10 @@ -9,3 +9,3 @@ // RUN: cat %t-mod.ll | FileCheck %s // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s jroelofs wrote: > While you're here, may as well shorten these

[PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: majnemer. jlebar added subscribers: tra, echristo, jhen, cfe-commits. This is important for e.g. the following case: void sync() { __syncthreads(); } void foo() { do_something(); sync(); do_something_else(): } Without this

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked 3 inline comments as done. Comment at: test/Modules/ModuleDebugInfo.cpp:10 @@ -9,3 +9,3 @@ // RUN: cat %t-mod.ll | FileCheck %s // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s jlebar wrote: > jlebar wrote: > > jroelofs wrote: > > >

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. Comment at: test/Modules/ModuleDebugInfo.cpp:10 @@ -9,3 +9,3 @@ // RUN: cat %t-mod.ll | FileCheck %s // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s jroelofs wrote: > jlebar wrote: > > jlebar wrote: > > >

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 47409. jlebar marked 2 inline comments as done. jlebar added a comment. Update per tra's review. http://reviews.llvm.org/D17056 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/convergent.cu Index: test/CodeGenCUDA/convergent.cu

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. Comment at: test/Modules/ModuleDebugInfo.cpp:10 @@ -9,3 +9,3 @@ // RUN: cat %t-mod.ll | FileCheck %s // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s jlebar wrote: > jroelofs wrote: > > While you're here,

r260334 - Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Feb 9 18:38:15 2016 New Revision: 260334 URL: http://llvm.org/viewvc/llvm-project?rev=260334=rev Log: Get rid of CHECK-SAME-NOT in tests. Summary: This isn't a FileCheck directive; it does nothing. Reviewers: jroelofs Subscribers: cfe-commits, majnemer Differential

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260334: Get rid of CHECK-SAME-NOT in tests. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D17051?vs=47385=47397#toc Repository: rL LLVM http://reviews.llvm.org/D17051

Re: r260334 - Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
-Original Message- >> From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of >> Justin Lebar via cfe-commits >> Sent: Tuesday, February 09, 2016 4:38 PM >> To: cfe-commits@lists.llvm.org >> Subject: r260334 - Get rid of CHECK-SAME-NOT in tests. &

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. Okay, I see why things don't work as expected without this patch but do work for e.g. macos universal binaries. The reason is, we build a completely separate set of actions for each invocation of cc1 -- one for the host compilation, and one for each device arch. Then

Re: [PATCH] D16932: [CUDA] Bug 26497 : Remove wrappers for variants already provided by CUDA headers.

2016-02-05 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Is it worth having a test, if only for one or two functions? http://reviews.llvm.org/D16932 ___ cfe-commits mailing list

Re: [PATCH] D16932: [CUDA] Bug 26497 : Remove wrappers for variants already provided by CUDA headers.

2016-02-05 Thread Justin Lebar via cfe-commits
jlebar added a comment. Oh right, CUDA headers. We really need to get a buildbot and/or tests in test-suite set up. http://reviews.llvm.org/D16932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-04 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Looks sane to me. Just some suggestions on the comments. Comment at: lib/Sema/SemaCUDA.cpp:71 @@ -70,3 +70,3 @@ // H - handled in (x) -// Preferences: b-best, f-fallback,

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Justin Lebar via cfe-commits
jlebar added a comment. lgtm. Thank you. http://reviews.llvm.org/D16638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Justin Lebar via cfe-commits
jlebar added a comment. lg with one question about printf. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:237 @@ +236,3 @@ +// device-side declaration for it. +__device__ int printf(const char *, ...); +} // extern "C" I think we want an attribute on

Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-02-02 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:215 @@ +214,3 @@ +// Device-side CUDA system calls. +// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls + It seems that only vprintf,

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-29 Thread Justin Lebar via cfe-commits
jlebar added a comment. Talking to echristo irl, he would like to know why we don't have this problem with mac universal binaries -- or, do we? He would like to be consistent; I'm onboard with that. http://reviews.llvm.org/D16514 ___ cfe-commits

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-29 Thread Justin Lebar via cfe-commits
jlebar added a comment. jingyue/jpienaar/rsmith - friendly ping? Without this, -O0 builds don't work, because they emit empty global initializers that don't get optimized out. http://reviews.llvm.org/D15305 ___ cfe-commits mailing list

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-29 Thread Justin Lebar via cfe-commits
jlebar added a comment. Eric, are you OK with this going in, or do you want to consider alternatives? http://reviews.llvm.org/D16514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. Comment at: lib/CodeGen/CGCUDABuiltin.cpp:109 @@ -106,1 +108,3 @@ +// stacksave/stackrestore intrinsics, which cause ptxas to choke. +auto *Alloca = new llvm::AllocaInst( llvm::Type::getInt8Ty(Ctx),

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. http://reviews.llvm.org/D16664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 46300. jlebar marked an inline comment as done. jlebar added a comment. Address tra's review comment (rename flag). http://reviews.llvm.org/D16514 Files: include/clang/Driver/Compilation.h include/clang/Driver/Driver.h include/clang/Driver/Options.td

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/Driver.cpp:650 @@ -638,3 +649,3 @@ SmallVector, 4> FailingCommands; - C.ExecuteJobs(C.getJobs(), FailingCommands); + C.ExecuteJobs(C.getJobs(), /* StopOnFailure = */ false, FailingCommands);

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar marked 3 inline comments as done. jlebar added a comment. Thank you for the reviews. Please have another look; I switched to using a struct proper. It's a lot cleaner! We're now assuming that the struct is aligned in the same way as vprintf wants, but if anything I expect this new

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/Driver.cpp:652 @@ -640,3 +651,3 @@ SmallVector, 4> FailingCommands; - C.ExecuteJobs(C.getJobs(), FailingCommands); + C.ExecuteJobs(C.getJobs(), /* StopOnFailure = */ false, FailingCommands);

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 46314. jlebar marked an inline comment as done. jlebar added a comment. Use a struct rather than an i8 buffer. http://reviews.llvm.org/D16664 Files: lib/CodeGen/CGCUDABuiltin.cpp test/CodeGenCUDA/printf.cu Index: test/CodeGenCUDA/printf.cu

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 46315. jlebar marked 3 inline comments as done. jlebar added a comment. Pass StopOnFailure = true when running the preprocessor after an ICE. http://reviews.llvm.org/D16514 Files: include/clang/Driver/Compilation.h include/clang/Driver/Driver.h

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D16514#338631, @echristo wrote: > In general it feels like keeping 2 errors might make the most sense: > > #if _NOT_ARCH4_ > #error "aiee!" > #endif > > clang -arch arch1 -arch arch2 -arch arch3 -arch arch4 t.c > > seems like it might be nice

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
Hm, well, https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format is close... Not sure if that triggers the bff clause, will consult my attorney. On Thu, Jan 28, 2016 at 4:09 PM, Justin Lebar wrote: > Do you have a script that will take as input a

r259122 - [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 28 17:58:28 2016 New Revision: 259122 URL: http://llvm.org/viewvc/llvm-project?rev=259122=rev Log: [CUDA] Generate CUDA's printf alloca in its function's entry block. Summary: This is necessary to prevent llvm from generating stacksave intrinsics around this alloca.

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. Comment at: lib/CodeGen/CGCUDABuiltin.cpp:87 @@ +86,3 @@ + // Construct and fill the args buffer that we'll pass to vprintf. + llvm::Value* BufferPtr; + if (Args.size() <= 1) { echristo wrote: > * on the wrong side ;)

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL259122: [CUDA] Generate CUDA's printf alloca in its function's entry block. (authored by jlebar). Changed prior to commit:

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
Do you have a script that will take as input a commit range and git commit --amend clang-tidy fixes for lines modified in that range? Because if so, a) I would be your best friend forever, and b) It should be simple to convert that into a linter for arc to catch the case when I forget to run said

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 46293. jlebar added a comment. Address echristo's review comments. http://reviews.llvm.org/D16664 Files: lib/CodeGen/CGCUDABuiltin.cpp test/CodeGenCUDA/printf.cu Index: test/CodeGenCUDA/printf.cu

Re: [PATCH] D16514: Add -stop-on-failure driver option, and enable it by default for CUDA compiles.

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

[PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-27 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, echristo, jhen, cfe-commits. This is necessary to prevent llvm from generating stacksave intrinsics around this alloca. NVVM doesn't have a stack, and we don't handle said intrinsics. I'm not sure if

Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-01-27 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Headers/__clang_cuda_cmath.h:222 @@ +221,3 @@ +__DEVICE__ void free(void *__ptr) { return ::free(__ptr); } +__DEVICE__ void *malloc(size_t __size) { return ::malloc(__size); } +

r258822 - [CUDA] Add -fcuda-allow-variadic-functions.

2016-01-26 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 26 11:47:20 2016 New Revision: 258822 URL: http://llvm.org/viewvc/llvm-project?rev=258822=rev Log: [CUDA] Add -fcuda-allow-variadic-functions. Summary: Turns out the variadic function checking added in r258643 was too strict for some existing users; give them an

Re: [PATCH] D16559: [CUDA] Add -fcuda-allow-variadic-functions.

2016-01-26 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258822: [CUDA] Add -fcuda-allow-variadic-functions. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16559?vs=45915=46005#toc Repository: rL LLVM

Re: [PATCH] D16593: [CUDA] Implemented device-side support for functions in .

2016-01-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. Missing (?) functions: - div, ldiv, lldiv, imaxdiv - imaxabs If you left these out intentionally (I forget if nvidia supports div_t), that's probably fine, but maybe add a comment? wrt the "::" comments, some are nits because I think we end up calling the right thing,

Re: [PATCH] D16501: [CUDA] Don't generate aliases for static extern "C" functions.

2016-01-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D16501#335225, @tra wrote: > Failing silently is not a good idea. At the very least there should produce > an error. > The right thing to do here, IMO, would be to generate a stub with alias name > that just jumps to or calls aliasee.

r258734 - [CUDA] Don't generate aliases for static extern "C" functions.

2016-01-25 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 25 16:36:37 2016 New Revision: 258734 URL: http://llvm.org/viewvc/llvm-project?rev=258734=rev Log: [CUDA] Don't generate aliases for static extern "C" functions. Summary: These aliases are done to support inline asm, but there's nothing we can do: NVPTX doesn't

Re: [PATCH] D16501: [CUDA] Don't generate aliases for static extern "C" functions.

2016-01-25 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258734: [CUDA] Don't generate aliases for static extern "C" functions. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16501?vs=45781=45919#toc Repository: rL LLVM

r258733 - [CUDA] Disable ctor/dtor aliases in device code.

2016-01-25 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 25 16:36:35 2016 New Revision: 258733 URL: http://llvm.org/viewvc/llvm-project?rev=258733=rev Log: [CUDA] Disable ctor/dtor aliases in device code. Summary: NVPTX doesn't support aliases, so don't generate them. Reviewers: tra Subscribers: cfe-commits, jhen,

Re: [PATCH] D16499: [CUDA] Disable ctor/dtor aliases in device code.

2016-01-25 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258733: [CUDA] Disable ctor/dtor aliases in device code. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16499?vs=45779=45918#toc Repository: rL LLVM

<    2   3   4   5   6   7   8   9   >