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

2016-02-09 Thread Justin Lebar via cfe-commits
om: 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. >> >> Author: jlebar &g

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 t

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
jlebar updated this revision to Diff 47520. jlebar added a comment. Per IRL discussion with echristo, updated so that we just bail as soon as one subjob fails. http://reviews.llvm.org/D16514 Files: lib/Driver/Compilation.cpp Index: lib/Driver/Compilation.cpp =

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&id=47525#toc Repository: rL LLVM http://reviews.llvm.org/D1

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&view=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. Proble

[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 l

[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: lib/CodeGen/CGCUDABuiltin.cp

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 cf

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 co

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. > Ultimately, Sema should be responsible for rejecting this, correct? I guess this is the part I'm unsure of. If it's legal to pass a struct to printf in regular C++ (seems to be?), I'd guess it should be legal in CUDA, too? I'm just not sure what it's supposed to do

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. > > I guess this is the part I'm unsure of. If it's legal to pass a struct to > > printf in regular C++ (seems to be?), I'd guess it should be legal in CUDA, > > too? I'm just not sure what it's supposed to do (in either case). > > > Is this because PTX does not ha

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 is

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. http://rev

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] 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&id=47571#toc Repository:

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: http://reviews.llvm.org/D17103?vs=47569&id=4

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&view=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 toolch

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&view=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 cras

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 th

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] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. lgtm http://reviews.llvm.org/D16870 ___ 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-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) th

[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 s

[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 clea

[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 behavio

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 ===

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] 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 faili

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#355228, @jlebar wrote: > Move coded into SetLLVMFunctionAttributes (not ForDefinition). Much better. :) http://reviews.llvm.org/D17056 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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:

[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. the

[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 p

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 built

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 ___ c

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] 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 mai

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&view=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 o

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&view=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&view=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 a

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&view=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

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&view=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; uint

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&id=48977#toc Repository: rL LLVM http:

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&id=48975#toc Repository: rL LLVM http://reviews.llvm.o

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&id=48976#toc Repository: rL LLVM http://reviews.llvm.org/D1

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&id=48978#toc Repository: rL LLVM

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&id=48979#toc Repository:

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&view=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() { __syncthrea

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

Re: [PATCH] D18617: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

2016-04-27 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267764: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D18617?vs=53415&id=55290#toc Repository: rL LLVM http://

r267764 - Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

2016-04-27 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Apr 27 14:12:56 2016 New Revision: 267764 URL: http://llvm.org/viewvc/llvm-project?rev=267764&view=rev Log: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil. Summary: As of D18614, TargetMachine exposes a hook to add a set of passes that should be run as earl

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-28 Thread Justin Lebar via cfe-commits
jlebar added a comment. Richard, friendly ping? http://reviews.llvm.org/D19346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 55646. jlebar added a comment. Add more comprehensive test. http://reviews.llvm.org/D19346 Files: include/clang/Basic/TargetOptions.h lib/Basic/Targets.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp test/Preprocessor/cuda

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. Richard, friendly ping? Comment at: lib/Basic/Targets.cpp:1642 @@ +1641,3 @@ + +std::unique_ptr HostTarget( +AllocateTarget(llvm::Triple(Opts.HostTriple), Opts)); tra wrote: > You may w

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 55648. jlebar added a comment. Add test for host == nvptx. http://reviews.llvm.org/D19346 Files: include/clang/Basic/TargetOptions.h lib/Basic/Targets.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp test/Preprocessor/cuda-

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked 2 inline comments as done. Closed by commit rL268131: [CUDA] Copy host builtin types to NVPTXTargetInfo. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D19346?vs=55648&id=55682#toc R

r268131 - [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Apr 29 18:05:19 2016 New Revision: 268131 URL: http://llvm.org/viewvc/llvm-project?rev=268131&view=rev Log: [CUDA] Copy host builtin types to NVPTXTargetInfo. Summary: Host and device types must match, otherwise when we pass values back and forth between the host and devi

[PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-05 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rsmith. jlebar added subscribers: cfe-commits, jhen. Herald added a subscriber: jholewinski. Previously it was implemented as inline asm in the CUDA headers. This change allows us to use the [addr+imm] addressing mode when executing ld.gl

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-05 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Basic/BuiltinsNVPTX.def:569-603 @@ -568,1 +568,37 @@ +// __ldg. This is not implemented as a builtin by nvcc. +BUILTIN(__nvvm_ldg_c, "ccC*", "") +BUILTIN(__nvvm_ldg_s, "ssC*", "") +BUILTIN(__nvvm_ldg_i, "iiC*", "") +BUILTI

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-05 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Basic/BuiltinsNVPTX.def:569-603 @@ -568,1 +568,37 @@ +// __ldg. This is not implemented as a builtin by nvcc. +BUILTIN(__nvvm_ldg_c, "ccC*", "") +BUILTIN(__nvvm_ldg_s, "ssC*", "") +BUILTIN(__nvvm_ldg_i, "iiC*", "") +BUILTI

Re: [PATCH] D20034: [CUDA] Only __shared__ variables can be static local on device side.

2016-05-06 Thread Justin Lebar via cfe-commits
jlebar added a comment. What are we supposed to do if we encounter a static __shared__ variable in an HD function? Presumably that also should be an error if we invoke the HD function from the device? http://reviews.llvm.org/D20034 ___ cfe-commit

Re: [PATCH] D20039: [CUDA] Restrict init of local __shared__ variables to empty constructors only.

2016-05-06 Thread Justin Lebar via cfe-commits
jlebar added a comment. While I think this is 100% the right thing to do, I am worried about breaking existing targets. Maybe we need an escape valve, at least until we get that sorted out? Unless you're pretty confident this isn't happening / will be easy enough to fix. Co

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. Art pointed me to the fact that CUDA 8 adds a bunch more load intrinsics, and I said ohmygosh maybe we *do* want to do the variadic intrinsic thing here. But now looking at how __builtin_add_overflow is implemented, we'd need special sema checking to make it work. We wo

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. Art pointed out that static_assert is c++11-only. I'll just remove them and make a note to move them into the CUDA test-suite stuff Art is working on. http://reviews.llvm.org/D19990 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 56603. jlebar added a comment. Remove static_asserts. http://reviews.llvm.org/D19990 Files: include/clang/Basic/BuiltinsNVPTX.def lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/__clang_cuda_intrinsics.h lib/Headers/__clang_cuda_ru

Re: [PATCH] D20039: [CUDA] Restrict init of local __shared__ variables to empty constructors only.

2016-05-09 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Art makes the good point that any code which is broken by this change is itself currently racy at the very best. And we have a way to fix any code which hits this new error (just manually ini

r269000 - [CUDA] Fix flush-denormals.cu test so that it checks what it intends to CHECK.

2016-05-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon May 9 19:34:50 2016 New Revision: 269000 URL: http://llvm.org/viewvc/llvm-project?rev=269000&view=rev Log: [CUDA] Fix flush-denormals.cu test so that it checks what it intends to CHECK. FileCheck does not evaluate plain CHECKs if you pass -check-prefix; you have to ask f

Re: [PATCH] D20139: [CUDA] Split device-var-init.cu tests into separate Sema and CodeGen parts.

2016-05-10 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Rubber stamp. http://reviews.llvm.org/D20139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D20140: [CUDA] Do not allow non-empty destructors for global device-side variables.

2016-05-10 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. lgtm, but I'd like Richard to sign off on this too. Comment at: lib/Sema/SemaDecl.cpp:10438 @@ -10437,1 +10437,3 @@ + // Also make sure that destructor, ifthere is one,

Re: [PATCH] D20141: Check for nullptr argument.

2016-05-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. Can we have a test? http://reviews.llvm.org/D20141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20141: Check for nullptr argument.

2016-05-10 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. OK, if the function explicitly says it accepts null values and if we check elsewhere in the function, I'm personally OK adding the checks. http://reviews.llvm.org/D20141 __

Re: [PATCH] D20034: [CUDA] Only __shared__ variables can be static local on device side.

2016-05-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. This patch regresses Eigen, because it raises an error even on host+device functions. Repository: rL LLVM http://reviews.llvm.org/D20034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping. This is a big help with some Tensorflow benchmarks. http://reviews.llvm.org/D19990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20341: [CUDA] Enable fusing FP ops for CUDA by default.

2016-05-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. I am not sure we want this? Although it matches nvcc, it does not match our floating-point behavior for C++ in general -- it makes us non-IEEE-whatever compliant by default. Although I agree that if we don't do this, lots of people are not going to pass -fp-contract=fa

Re: [PATCH] D20341: [CUDA] Enable fusing FP ops for CUDA by default.

2016-05-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. > But people also don't expect IEEE compliance on GPUs Is that true? You have a lot more experience with this than I do, but my observation of nvidia's hardware is that it's moved to add *more* IEEE compliance as it's matured. For example, older hardware didn't suppor

Re: [PATCH] D20341: [CUDA] Enable fusing FP ops for CUDA by default.

2016-05-19 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Well, if the CUDA documentation says so...let's do it. :) Thanks for your patience, everyone. http://reviews.llvm.org/D20341 ___ cfe-commits m

r270150 - [CUDA] Implement __ldg using intrinsics.

2016-05-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu May 19 17:49:13 2016 New Revision: 270150 URL: http://llvm.org/viewvc/llvm-project?rev=270150&view=rev Log: [CUDA] Implement __ldg using intrinsics. Summary: Previously it was implemented as inline asm in the CUDA headers. This change allows us to use the [addr+imm] addr

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270150: [CUDA] Implement __ldg using intrinsics. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D19990?vs=56603&id=57873#toc Repository: rL LLVM http://reviews.llvm.org/D1999

[PATCH] D20457: Update -ffast-math documentation to match reality.

2016-05-19 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added a subscriber: cfe-commits. http://reviews.llvm.org/D20457 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td Index: include/clang/Driver/Options.td

Re: [PATCH] D20457: Update -ffast-math documentation to match reality.

2016-05-20 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 57958. jlebar added a comment. Update per Richard's review. http://reviews.llvm.org/D20457 Files: docs/UsersManual.rst include/clang/Basic/LangOptions.def include/clang/Driver/Options.td Index: include/clang/Driver/Options.td =

[PATCH] D20481: [CUDA] Define __USE_FAST_MATH__ when __FAST_MATH__ is defined.

2016-05-20 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added a subscriber: cfe-commits. The CUDA headers look for __USE_FAST_MATH__. http://reviews.llvm.org/D20481 Files: lib/Headers/__clang_cuda_runtime_wrapper.h Index: lib/Headers/__clang_cuda_runtime_wrapper.h ==

Re: [PATCH] D20481: [CUDA] Define __USE_FAST_MATH__ when __FAST_MATH__ is defined.

2016-05-20 Thread Justin Lebar via cfe-commits
jlebar abandoned this revision. jlebar added a comment. Actually, after talking offline with Chandler, I need something more complicated than this. I will send a new patch. Sorry for the noise. http://reviews.llvm.org/D20481 ___ cfe-commits maili

[PATCH] D20493: [CUDA] Add -fcuda-approx-transcendentals flag.

2016-05-20 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: cfe-commits, tra. This lets us emit e.g. sin.approx.f32. See http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin http://reviews.llvm.org/D20493 Files: include/clang/Basic/L

Re: [PATCH] D20457: Update -ffast-math documentation to match reality.

2016-05-20 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270279: Update -ffast-math documentation to match reality. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D20457?vs=57958&id=57995#toc Repository: rL LLVM http://reviews.llvm

r270279 - Update -ffast-math documentation to match reality.

2016-05-20 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri May 20 16:33:01 2016 New Revision: 270279 URL: http://llvm.org/viewvc/llvm-project?rev=270279&view=rev Log: Update -ffast-math documentation to match reality. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20457 Modified:

r264742 - [CUDA] Add missing #undef __DEVICE__ to CUDA shim header.

2016-03-29 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Mar 29 11:24:23 2016 New Revision: 264742 URL: http://llvm.org/viewvc/llvm-project?rev=264742&view=rev Log: [CUDA] Add missing #undef __DEVICE__ to CUDA shim header. Modified: cfe/trunk/lib/Headers/__clang_cuda_cmath.h Modified: cfe/trunk/lib/Headers/__clang_cuda_cma

r264741 - [CUDA] Fix order of overloading preferences in comment.

2016-03-29 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Mar 29 11:24:22 2016 New Revision: 264741 URL: http://llvm.org/viewvc/llvm-project?rev=264741&view=rev Log: [CUDA] Fix order of overloading preferences in comment. Modified: cfe/trunk/lib/Sema/SemaCUDA.cpp Modified: cfe/trunk/lib/Sema/SemaCUDA.cpp URL: http://llvm.o

r264739 - [CUDA] Remove three obsolete CUDA cc1 flags.

2016-03-29 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Mar 29 11:24:16 2016 New Revision: 264739 URL: http://llvm.org/viewvc/llvm-project?rev=264739&view=rev Log: [CUDA] Remove three obsolete CUDA cc1 flags. Summary: * -fcuda-target-overloads Previously unconditionally set to true by the driver. Necessary for correct fu

r264740 - [CUDA] Make CUDA description strings in langopts into noun phrases. NFC

2016-03-29 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Mar 29 11:24:20 2016 New Revision: 264740 URL: http://llvm.org/viewvc/llvm-project?rev=264740&view=rev Log: [CUDA] Make CUDA description strings in langopts into noun phrases. NFC rsmith quoth in D18380: > This should be a noun phrase -- this string appears in contexts

Re: [PATCH] D18416: [CUDA] Remove three obsolete CUDA cc1 flags.

2016-03-29 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264739: [CUDA] Remove three obsolete CUDA cc1 flags. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D18416?vs=51478&id=51935#toc Repository: rL LLVM http://reviews.llvm.org/D

Re: [PATCH] D18539: [CUDA] Add math forward declares.

2016-03-29 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 51988. jlebar added a comment. Fix typo in wrapper header. (How did this ever work??) http://reviews.llvm.org/D18539 Files: lib/Headers/CMakeLists.txt lib/Headers/__clang_cuda_math_forward_declares.h lib/Headers/__clang_cuda_runtime_wrapper.h Index:

[PATCH] D18613: [PassManager] Make PassManagerBuilder::addExtension take an std::function, rather than a function pointer.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: chandlerc. jlebar added a subscriber: cfe-commits. Herald added a subscriber: joker.eph. This gives callers flexibility to pass lambdas with captures, which lets callers avoid the C-style void*-ptr closure style. (Currently, callers in clang

Re: [PATCH] D18380: [CUDA] Make unattributed constexpr functions (usually) implicitly host+device.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar added a comment. (Just to be clear, I'm waiting on Richard's review here, even though he lg'ed an version of this patch.) http://reviews.llvm.org/D18380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D18617: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: chandlerc. jlebar added subscribers: tra, cfe-commits, rnk. As of D18614, TargetMachine exposes a hook to add a set of passes that should be run as early as possible. Invoke this hook from clang when setting up the pass manager. http://revie

Re: [PATCH] D18538: [Sema] s/UseUsingDeclRules/UseMemberUsingDeclRules/

2016-03-30 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264920: [Sema] s/UseUsingDeclRules/UseMemberUsingDeclRules/ (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D18538?vs=51866&id=52117#toc Repository: rL LLVM http://reviews.llv

r264920 - [Sema] s/UseUsingDeclRules/UseMemberUsingDeclRules/

2016-03-30 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Mar 30 15:41:05 2016 New Revision: 264920 URL: http://llvm.org/viewvc/llvm-project?rev=264920&view=rev Log: [Sema] s/UseUsingDeclRules/UseMemberUsingDeclRules/ Summary: IsOverload has a param named UseUsingDeclRules. But as far as I can tell, it should be called UseMembe

[PATCH] D18629: [CUDA] Don't initialize the CUDA toolchain if we don't have any CUDA inputs.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, sunfish, echristo. This prevents errors when you invoke clang with a flag that the NVPTX toolchain doesn't support. For example, on x86-64, clang -mthread-model single -x c++ /dev/null -o /dev/nu

Re: [PATCH] D18539: [CUDA] Add math forward declares.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. Thank you for the review, Art! http://reviews.llvm.org/D18539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18380: [CUDA] Make unattributed constexpr functions (usually) implicitly host+device.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. Thank you all your time here, Art, Reid, and Richard. Fingers crossed we don't have to worry about this again for a while... http://reviews.llvm.org/D18380 ___ cfe-commits mailing li

Re: [PATCH] D18629: [CUDA] Don't initialize the CUDA toolchain if we don't have any CUDA inputs.

2016-03-30 Thread Justin Lebar via cfe-commits
jlebar added a comment. Discussed offline, this is clang-formatted. Thank you for the review, Eric! http://reviews.llvm.org/D18629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   9   >