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

2016-03-28 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D18380#385240, @tra wrote: > What if instead of permanently sticking HD attributes on the constexpr > function, we instead postpone decision to the point of overload resolution > and figure out effective attributes or call preference based on c

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/kernel-call.cu:27 @@ -26,1 +26,3 @@ + + g1<<>>(42); // expected-error {{use of undeclared identifier 'undeclared'}} } We set four things in setConfig -- does this test fail if any one of them is commented

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44056. jlebar marked 2 inline comments as done. jlebar added a comment. Address tra's review comments. http://reviews.llvm.org/D15596 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar added a comment. I'm sorry I sat on this for so long; I failed at email somehow, and only came back to ping this patch. :) Comment at: lib/Driver/ToolChains.cpp:4125 @@ +4124,3 @@ + ArgStringList &LDArgs) const { + if (DriverArgs.hasArg(opt

[PATCH] D15911: Switch Action and ActionList over to using std::shared_ptr.

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: echristo. jlebar added a subscriber: cfe-commits. jlebar added a dependency: D15910: Make isa, cast, dyn_cast, etc. work with std::unique_ptr and std::shared_ptr.. Herald added a subscriber: klimek. This makes constructing Action graphs which

Re: [PATCH] D15911: Switch Action and ActionList over to using std::shared_ptr.

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar added a comment. The main reason I want this is for CUDA. The way CUDA compilation will work, once I finish my patch, is: For each GPU arch, we compile device code to assembly (ptx) and then assemble the ptx into an object file (cubin). We then pass the cubins *and* ptx files to nVidia

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4125 @@ +4124,3 @@ + ArgStringList &LDArgs) const { + if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid()) +return; tra wrote: > I'd rena

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 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, although I have no idea what I'm doing here; you should probably get someone else's approval. http://reviews.llvm.org/D15858 _

[PATCH] D15933: Rename -nocudalib to -nocudalibdevice.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Per discussion in D15596. http://reviews.llvm.org/D15933 Files: include/clang/Driver/Options.td lib/Driver/ToolChains.cpp test/Driver/cuda-detect.cu Index: test/Driver/cuda-detect.cu ==

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44145. jlebar added a dependency: D15933: Rename -nocudalib to -nocudalibdevice.. jlebar added a comment. Now also pass -lcudart_static -lcuda -ldl -lrt -pthread for CUDA compiles. Depends on http://reviews.llvm.org/D15933. http://reviews.llvm.org/D15596 Fi

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. Done, please have another look. http://reviews.llvm.org/D15596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15936: Update code in buildCudaActions to latest idiom.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Use llvm::make_unique, std::all_of, std::find, etc. No functional changes. Prerequisite for further changes to Driver. http://reviews.llvm.org/D15936 Files: lib/Driver/Driver.cpp Index: lib/D

Re: [PATCH] D15936: Update code in buildCudaActions and BuildActions to latest idiom.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44154. jlebar added a dependency: D15911: Switch Action and ActionList over to using std::shared_ptr.. jlebar added a comment. Rebasing onto http://reviews.llvm.org/D15911. Depends on http://reviews.llvm.org/D15911. http://reviews.llvm.org/D15936 Files:

Re: [PATCH] D15936: Update code in buildCudaActions and BuildActions to latest idiom.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44155. jlebar added a comment. Fix rebase conflict. http://reviews.llvm.org/D15936 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++ lib/Driver/Drive

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44156. jlebar marked 4 inline comments as done. jlebar added a comment. Address tra's review comments. http://reviews.llvm.org/D15596 Files: include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChai

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar added a comment. Updated code; please have a look. Comment at: include/clang/Driver/Options.td:1636 @@ -1635,1 +1635,3 @@ +def nocudalib : Flag<["-"], "nocudalib">, + HelpText<"Don't include libraries necessary for running CUDA (-L/path/to/cuda/lib{,64} -lcudart_static

Re: [PATCH] D15936: Update code in buildCudaActions and BuildActions to latest idiom.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44158. jlebar added a comment. Address tra's review comments. http://reviews.llvm.org/D15936 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++ lib/Dr

Re: [PATCH] D15936: Update code in buildCudaActions and BuildActions to latest idiom.

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

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44160. jlebar added a comment. Adding back testcase that ensures that our flags are added after user flags. http://reviews.llvm.org/D15596 Files: include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/Too

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4129-4137 @@ -4123,4 +4128,11 @@ + LDArgs.push_back("-L"); + LDArgs.push_back(DriverArgs.MakeArgString(CudaInstallation.getLibPath())); + for (const char *Flag : {"-lcudart_static", "-ldl", "-lrt", "-lpthread"}

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44170. jlebar marked 2 inline comments as done. jlebar added a comment. Address tra's review comments. http://reviews.llvm.org/D15596 Files: include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChai

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Driver/Options.td:1636 @@ -1635,1 +1635,3 @@ +def nocudalib : Flag<["-"], "nocudalib">, + HelpText<"Don't link with libraries necessary for running CUDA (-L/path/to/cuda/lib{,64} -lcudart_static -lrt -lpthread -ldl)">; def

[PATCH] D15939: Pass the Compilation as an arg to AddLinkerInputs.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, echristo. jlebar added a subscriber: cfe-commits. Currently this arg is unused; a use is added in D15596. http://reviews.llvm.org/D15939 Files: lib/Driver/Tools.cpp Index: lib/Driver/Tools.cpp =

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44178. jlebar added a comment. Split out the bits adding an arg to AddLinkerInputs into a separate patch, http://reviews.llvm.org/D15939. http://reviews.llvm.org/D15596 Files: include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver

Re: [PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar abandoned this revision. jlebar added a comment. > It just struck me that this patch may not be as useful as we'd like it to be. Oh. Yes. I guess I'll drop this and http://reviews.llvm.org/D15939. :( http://reviews.llvm.org/D15596 ___ cf

Re: [PATCH] D15939: Pass the Compilation as an arg to AddLinkerInputs.

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar abandoned this revision. jlebar added a comment. Per http://reviews.llvm.org/D15596, this actually doesn't help us. Oops. http://reviews.llvm.org/D15939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

r257090 - Remove extraneous "Note t" in comment.

2016-01-07 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 7 13:38:29 2016 New Revision: 257090 URL: http://llvm.org/viewvc/llvm-project?rev=257090&view=rev Log: Remove extraneous "Note t" in comment. Added in r167571. Modified: cfe/trunk/include/clang/Driver/ToolChain.h Modified: cfe/trunk/include/clang/Driver/ToolCha

[PATCH] D15974: [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Trying to make this test a bit more manageable. http://reviews.llvm.org/D15974 Files: test/Driver/cuda-options.cu test/Driver/cuda-unused-arg-warning.cu Index: test/Driver/cuda-unused-arg-war

Re: [PATCH] D15911: Switch Action and ActionList over to using std::shared_ptr.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44272. jlebar marked 2 inline comments as done. jlebar added a comment. Address review comments. http://reviews.llvm.org/D15911 Files: include/clang/Driver/Action.h include/clang/Driver/Driver.h include/clang/Driver/Util.h lib/Driver/Action.cpp lib

Re: [PATCH] D15911: Switch Action and ActionList over to using std::shared_ptr.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44307. jlebar added a comment. Switch to maintaining ownership of the Actions within the Compilation. http://reviews.llvm.org/D15911 Files: include/clang/Driver/Action.h include/clang/Driver/Compilation.h include/clang/Driver/Driver.h lib/Driver/Acti

Re: [PATCH] D15911: Move ownership of Action objects into Compilation.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44308. jlebar retitled this revision from "Move ownership of Action objects into Compilation. " to "Move ownership of Action objects into Compilation.". jlebar added a comment. Clear both Actions and OwningActions in Compilation::initCompilationForDiagnostics

Re: [PATCH] D15911: Move ownership of Action objects into Compilation.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar added a comment. Changed to move ownership into Compilation, as discussed earlier today. Please have a look. http://reviews.llvm.org/D15911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-07 Thread Justin Lebar via cfe-commits
jlebar added a comment. This actually has a subtle issue not found with existing unit tests: BuildJobsForAction has an outparam and we don't set it on cache hit. Please hold off reviewing this until I fix the problem. http://reviews.llvm.org/D15960 __

r257142 - [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.

2016-01-07 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 7 21:33:04 2016 New Revision: 257142 URL: http://llvm.org/viewvc/llvm-project?rev=257142&view=rev Log: [CUDA] Split out tests for unused-arg warnings from cuda-options.cu. Summary: Trying to make this test a bit more manageable. Reviewers: tra Subscribers: cfe-comm

Re: [PATCH] D15974: [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.

2016-01-07 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257142: [CUDA] Split out tests for unused-arg warnings from cuda-options.cu. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D15974?vs=44270&id=44309#toc Repository: rL LLVM h

r257190 - Update code in buildCudaActions and BuildActions to latest idiom.

2016-01-08 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jan 8 13:04:11 2016 New Revision: 257190 URL: http://llvm.org/viewvc/llvm-project?rev=257190&view=rev Log: Update code in buildCudaActions and BuildActions to latest idiom. Summary: Use llvm::any_of, llvm::find, etc. No functional changes. Reviewers: tra Subscribers:

Re: [PATCH] D15936: Update code in buildCudaActions and BuildActions to latest idiom.

2016-01-08 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257190: Update code in buildCudaActions and BuildActions to latest idiom. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D15936?vs=44158&id=44341#toc Repository: rL LLVM http

r257197 - Fix incorrectly line-broken comment in Driver.h.

2016-01-08 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jan 8 13:28:34 2016 New Revision: 257197 URL: http://llvm.org/viewvc/llvm-project?rev=257197&view=rev Log: Fix incorrectly line-broken comment in Driver.h. Also sort includes. Modified: cfe/trunk/include/clang/Driver/Driver.h Modified: cfe/trunk/include/clang/Drive

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-08 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44377. jlebar added a dependency: D16013: Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.. jlebar added a comment. Fixing bug caused by missing an outparam. Covered by tests in WIP CUDA+ptxas+fatbin patch. Depends on http:/

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-08 Thread Justin Lebar via cfe-commits
jlebar added a comment. OK, this is now working, please have a look. I'm not sure if it's possible to write a test as-is, but I have a test for my mistake in my WIP CUDA patch. (Also this mistake is much harder to make after http://reviews.llvm.org/D16013.) http://reviews.llvm.org/D15960

Re: [PATCH] D15911: Move ownership of Action objects into Compilation.

2016-01-08 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Driver/Action.h:36 @@ -35,1 +35,3 @@ +/// +/// Actions are usually owned by a Compilation. class Action { tra wrote: > There's no API to pass ownership to Compilation explicitly, so the only way > for an Ac

Re: [PATCH] D15911: Move ownership of Action objects into Compilation.

2016-01-08 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44379. jlebar marked 4 inline comments as done. jlebar added a comment. Address tra and dblaikie's review comments. http://reviews.llvm.org/D15911 Files: include/clang/Driver/Action.h include/clang/Driver/Compilation.h include/clang/Driver/Driver.h l

[PATCH] D16078: Add an Action* member to InputInfo.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: echristo. jlebar added subscribers: cfe-commits, tra, jhen. Herald added subscribers: dschuff, jfb. The CUDA toolchain needs to know which Actions created which InputInfos, because it needs to attach GPU archs to the various InputInfos. http:

[PATCH] D16080: [CUDA] Add tests for compiling CUDA files with -E.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, cfe-commits. http://reviews.llvm.org/D16080 Files: test/Driver/cuda-preprocess.cu Index: test/Driver/cuda-preprocess.cu === --- /dev/null

[PATCH] D16081: [CUDA] Add test for compiling CUDA code with -S.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, cfe-commits. http://reviews.llvm.org/D16081 Files: test/Driver/cuda-options.cu test/Driver/cuda-output-asm.cu Index: test/Driver/cuda-output-asm.cu

[PATCH] D16079: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: echristo, jhen, cfe-commits. http://reviews.llvm.org/D16079 Files: include/clang/Driver/Action.h lib/Driver/Action.cpp lib/Driver/Driver.cpp test/Driver/cuda-bad-arch.cu Index: test/Driver/cuda-bad-arch

[PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, echristo. jlebar added subscribers: jhen, cfe-commits. Previously we compiled CUDA device code to PTX assembly and embedded that asm as text in our host binary. Now we compile to PTX assembly and then invoke ptxas to assemble the PTX into

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D15960#324162, @echristo wrote: > So, how are you getting to the point where you're trying to create the same > action twice? > > -eric In the new CUDA world, we have the following graph, which I hope will render properly: foo.cu --> foo.s

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D15960#324162, @echristo wrote: > So, how are you getting to the point where you're trying to create the same > action twice? > > -eric In the new CUDA world, we have the following graph, which I hope will render properly: foo.cu --> foo.s

Re: [PATCH] D16079: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44564. jlebar added a comment. Add missing change to DiagnosticDriverKinds.td. http://reviews.llvm.org/D16079 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Action.h lib/Driver/Action.cpp lib/Driver/Driver.cpp test/Driver/

Re: [PATCH] D16079: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. Oops, I added the new error to the generated file in my objdir, rather than in the source tree. It worked fine until I rebuilt... Eric, please have a look at the change to DiagnosticDriverKinds.td. http://reviews.llvm.org/D16079 _

r257407 - Move ownership of Action objects into Compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 11 17:07:27 2016 New Revision: 257407 URL: http://llvm.org/viewvc/llvm-project?rev=257407&view=rev Log: Move ownership of Action objects into Compilation. Summary: This makes constructing Action graphs which are DAGs much simpler. It also just simplifies in general t

Re: [PATCH] D15911: Move ownership of Action objects into Compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257407: Move ownership of Action objects into Compilation. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D15911?vs=44379&id=44566#toc Repository: rL LLVM http://reviews.llvm

r257408 - Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.

2016-01-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 11 17:09:32 2016 New Revision: 257408 URL: http://llvm.org/viewvc/llvm-project?rev=257408&view=rev Log: Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam. Summary: Explicit is better than implicit. Reviewers: echristo Subscribers: ll

r257411 - Add an Action* member to InputInfo.

2016-01-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 11 17:15:21 2016 New Revision: 257411 URL: http://llvm.org/viewvc/llvm-project?rev=257411&view=rev Log: Add an Action* member to InputInfo. Summary: The CUDA toolchain needs to know which Actions created which InputInfos, because it needs to attach GPU archs to the va

Re: [PATCH] D16078: Add an Action* member to InputInfo.

2016-01-11 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257411: Add an Action* member to InputInfo. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16078?vs=44539&id=44568#toc Repository: rL LLVM http://reviews.llvm.org/D16078 Fi

r257413 - [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

2016-01-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Jan 11 17:27:13 2016 New Revision: 257413 URL: http://llvm.org/viewvc/llvm-project?rev=257413&view=rev Log: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://

Re: [PATCH] D16079: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

2016-01-11 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257413: [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16079?vs=44564&id=44569#toc Repository: rL

[PATCH] D16097: [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: echristo, jhen, cfe-commits. This is used by D16082 when it invokes fatbinary. http://reviews.llvm.org/D16097 Files: include/clang/Driver/Action.h lib/Driver/Action.cpp test/Driver/cuda-bad-arch.cu Index

Re: [PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D16082#324138, @tra wrote: > Make sure it works with -save-temps and -fintegrated-as/-fno-integrated-as. > They tend to throw wrenches into pipeline construction. Thanks. All of them worked except -fintegrated-as, which was causing us not to

Re: [PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44584. jlebar marked 8 inline comments as done. jlebar added a comment. Address tra, echristo's review comments. http://reviews.llvm.org/D16082 Files: include/clang/Driver/Action.h include/clang/Driver/Options.td include/clang/Driver/ToolChain.h incl

Re: [PATCH] D16097: [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44585. jlebar added a comment. Update to latest set of architectures, according to ptxas --help from cuda 7.5. http://reviews.llvm.org/D16097 Files: include/clang/Driver/Action.h lib/Driver/Action.cpp test/Driver/cuda-bad-arch.cu Index: test/Driver/cu

Re: [PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-11 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44586. jlebar added a comment. Add test checking that sm_XX gets translated to compute_YY correctly. http://reviews.llvm.org/D16082 Files: include/clang/Driver/Action.h include/clang/Driver/Options.td include/clang/Driver/ToolChain.h include/clang/Dr

Re: [PATCH] D16097: [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-12 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D16097#325093, @echristo wrote: > Seems reasonable. Why remove all of the tests though? Previously we were checking that the arch was of the form /^sm_\d+$/ -- now we're checking that it's one of some list of acceptable things. I figured that

Re: [PATCH] D16097: [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-12 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44673. jlebar added a comment. Use llvm::StringSwitch instead of a sequence of if statements. http://reviews.llvm.org/D16097 Files: include/clang/Driver/Action.h lib/Driver/Action.cpp test/Driver/cuda-bad-arch.cu Index: test/Driver/cuda-bad-arch.cu ==

Re: [PATCH] D16097: [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-12 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257530: [CUDA] Add explicit mapping from sm_XX to compute_YY. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16097?vs=44673&id=44675#toc Repository: rL LLVM http://reviews.l

r257530 - [CUDA] Add explicit mapping from sm_XX to compute_YY.

2016-01-12 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 12 16:23:04 2016 New Revision: 257530 URL: http://llvm.org/viewvc/llvm-project?rev=257530&view=rev Log: [CUDA] Add explicit mapping from sm_XX to compute_YY. Summary: This is used by D16082 when it invokes fatbinary. Reviewers: tra Subscribers: cfe-commits, jhen, ec

r257554 - [CUDA] Report an error if code tries to mix incompatible CUDA attributes.

2016-01-12 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 12 19:07:35 2016 New Revision: 257554 URL: http://llvm.org/viewvc/llvm-project?rev=257554&view=rev Log: [CUDA] Report an error if code tries to mix incompatible CUDA attributes. Summary: Thanks to jhen for helping me figure this out. Reviewers: tra, echristo Subscri

r257557 - [CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu.

2016-01-12 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 12 19:24:35 2016 New Revision: 257557 URL: http://llvm.org/viewvc/llvm-project?rev=257557&view=rev Log: [CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu. Summary: Rename the args to be more human-readable. Among other things, this lets u

Re: [PATCH] D16080: [CUDA] Add tests for compiling CUDA files with -E.

2016-01-13 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 44823. jlebar added a comment. Address tra's review comments. http://reviews.llvm.org/D16080 Files: test/Preprocessor/cuda-preprocess.cu Index: test/Preprocessor/cuda-preprocess.cu === --- /d

Re: [PATCH] D16080: [CUDA] Add tests for compiling CUDA files with -E.

2016-01-13 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. Comment at: test/Driver/cuda-preprocess.cu:13-16 @@ +12,6 @@ + +// RUN: %clang -E -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 %s 2>&1 \ +// RUN: | FileCheck -check-prefix NOARCH %s +// RUN: %clang -E -target x86_64-linux-gnu --cuda-gpu

Re: [PATCH] D16080: [CUDA] Add tests for compiling CUDA files with -E.

2016-01-13 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. Thank you for the review, Artem. http://reviews.llvm.org/D16080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r257807 - [CUDA] Add tests for compiling CUDA files with -E.

2016-01-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 14 15:41:18 2016 New Revision: 257807 URL: http://llvm.org/viewvc/llvm-project?rev=257807&view=rev Log: [CUDA] Add tests for compiling CUDA files with -E. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D16080 Added:

r257809 - [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 14 15:41:27 2016 New Revision: 257809 URL: http://llvm.org/viewvc/llvm-project?rev=257809&view=rev Log: [CUDA] Invoke ptxas and fatbinary during compilation. Summary: Previously we compiled CUDA device code to PTX assembly and embedded that asm as text in our host bin

Re: [PATCH] D16080: [CUDA] Add tests for compiling CUDA files with -E.

2016-01-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257807: [CUDA] Add tests for compiling CUDA files with -E. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16080?vs=44823&id=44920#toc Repository: rL LLVM http://reviews.llvm

r257810 - [CUDA] Add test for compiling CUDA code with -S.

2016-01-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 14 15:41:31 2016 New Revision: 257810 URL: http://llvm.org/viewvc/llvm-project?rev=257810&view=rev Log: [CUDA] Add test for compiling CUDA code with -S. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D16081 Added: c

r257808 - Don't build jobs for the same Action + ToolChain twice.

2016-01-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 14 15:41:21 2016 New Revision: 257808 URL: http://llvm.org/viewvc/llvm-project?rev=257808&view=rev Log: Don't build jobs for the same Action + ToolChain twice. Summary: Right now if the Action graph is a DAG and we encounter an action twice, we will run it twice. Thi

Re: [PATCH] D16081: [CUDA] Add test for compiling CUDA code with -S.

2016-01-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257810: [CUDA] Add test for compiling CUDA code with -S. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16081?vs=44542&id=44922#toc Repository: rL LLVM http://reviews.llvm.o

Re: [PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

2016-01-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257809: [CUDA] Invoke ptxas and fatbinary during compilation. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16082?vs=44586&id=44921#toc Repository: rL LLVM http://reviews.l

r257839 - [CUDA] Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jan 14 17:31:30 2016 New Revision: 257839 URL: http://llvm.org/viewvc/llvm-project?rev=257839&view=rev Log: [CUDA] Warn undeclared identifiers in CUDA kernel calls Value, type, and instantiation dependence were not being handled correctly for CUDAKernelCallExpr AST nodes.

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257839: [CUDA] Warn undeclared identifiers in CUDA kernel calls (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D15858?vs=44933&id=44938#toc Repository: rL LLVM http://reviews

Re: r257808 - Don't build jobs for the same Action + ToolChain twice.

2016-01-15 Thread Justin Lebar via cfe-commits
fx2xl9kr9kg0gg_9ccgn/T/hello_world-1b17ac.out have >> the same architectures (armv7) and can't be in the same fat output file >> clang-3.9: error: lipo command failed with exit code 1 (use -v to see >> invocation) >> >> Can someone more familiar with thi

[PATCH] D16250: Respect bound archs, even when they don't alter the toolchain.

2016-01-15 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, beanz, echristo. Herald added a subscriber: aemerson. It's possible to BindArch without changing the toolchain at all. For example, armv7 and armv7s have exactly the same triple. Therefore the code

Re: r257808 - Don't build jobs for the same Action + ToolChain twice.

2016-01-15 Thread Justin Lebar via cfe-commits
ures (armv7) and can't be in the same fat output file >>> clang-3.9: error: lipo command failed with exit code 1 (use -v to see >>> invocation) >>> >>> Can someone more familiar with this code please take a look? >>> >>> Thanks,

Re: [PATCH] D15960: Don't build jobs for the same Action + ToolChain twice.

2016-01-15 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a reviewer: jlebar. jlebar added a comment. This revision is now accepted and ready to land. Pushed in r257808 with echristo's lg (sorry, didn't have the right metadata in the commit). http://reviews.llvm.org/D15960

Re: [PATCH] D16250: Respect bound archs, even when they don't alter the toolchain.

2016-01-15 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D16250#328552, @tra wrote: > Looks OK to me. > Perhaps BoundArch w/o toolchain is sufficient for the key as toolchain would > be derived from it. Yeah, it might work, I wasn't convinced it was sound. The bound TC is derived from the origin

r257983 - Respect bound archs, even when they don't alter the toolchain.

2016-01-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jan 15 21:30:08 2016 New Revision: 257983 URL: http://llvm.org/viewvc/llvm-project?rev=257983&view=rev Log: Respect bound archs, even when they don't alter the toolchain. Summary: It's possible to BindArch without changing the toolchain at all. For example, armv7 and arm

Re: [PATCH] D16250: Respect bound archs, even when they don't alter the toolchain.

2016-01-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257983: Respect bound archs, even when they don't alter the toolchain. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16250?vs=45061&id=45064#toc Repository: rL LLVM http://

r257986 - Fix buildbot bustage in Driver/darwin-multiarch-arm.c caused by r257983.

2016-01-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Jan 15 22:50:13 2016 New Revision: 257986 URL: http://llvm.org/viewvc/llvm-project?rev=257986&view=rev Log: Fix buildbot bustage in Driver/darwin-multiarch-arm.c caused by r257983. The test was too loose; "ld" was matching directories named "build" in the path. Modified:

[PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

2016-01-16 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, echristo, jhen. Warn for NVCC compatibility if you declare a static member function or inline function as __global__. http://reviews.llvm.org/D16261 Files: include/clang/Basic/DiagnosticSemaKinds

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

2016-01-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. tra asked me to check for coverage. Looks pretty good in that respect. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6419 @@ +6418,3 @@ +"dynamic initialization is not supported for " +"__device__, __constant__ and __shared__ variables."

[PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-18 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, echristo, cfe-commits. Previously we'd crash the driver if you passed -O0. Now we try to handle all of clang's various optimization flags in a sane way. http://reviews.llvm.org/D16307 Files: lib/Driver

Re: [PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-18 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 45222. jlebar added a comment. Map -Os, -Oz to -O2, rather than -O3. http://reviews.llvm.org/D16307 Files: lib/Driver/Tools.cpp test/Driver/cuda-external-tools.cu Index: test/Driver/cuda-external-tools.cu

Re: [PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-18 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 45223. jlebar added a comment. Update comment http://reviews.llvm.org/D16307 Files: lib/Driver/Tools.cpp test/Driver/cuda-external-tools.cu Index: test/Driver/cuda-external-tools.cu === ---

r258174 - [CUDA] Handle -O options (more) correctly.

2016-01-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 19 13:52:21 2016 New Revision: 258174 URL: http://llvm.org/viewvc/llvm-project?rev=258174&view=rev Log: [CUDA] Handle -O options (more) correctly. Summary: Previously we'd crash the driver if you passed -O0. Now we try to handle all of clang's various optimization fl

Re: [PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258174: [CUDA] Handle -O options (more) correctly. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16307?vs=45223&id=45290#toc Repository: rL LLVM http://reviews.llvm.org/D16

Re: [PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

2016-01-19 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 45297. jlebar marked an inline comment as done. jlebar added a comment. Address tra's review. http://reviews.llvm.org/D16261 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCUDA.cpp lib/Sema/SemaDeclAttr.cpp test/SemaCUDA/bad-attribute

Re: [PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

2016-01-19 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you for the review. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6418 @@ +6417,3 @@ +def warn_nvcc_compat_kern_is_method : Warning< + "kernel function %0 is a member function; this may not be accepted by nvcc">, + InGroup; --

Re: [PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

2016-01-19 Thread Justin Lebar via cfe-commits
jlebar added a comment. Checked Thrust as we discussed. It doesn't seem to be getting hung up here. http://reviews.llvm.org/D16261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D16331: [CUDA] Bail, rather than crash, on va_arg in device code.

2016-01-19 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, jhen, echristo. http://reviews.llvm.org/D16331 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCUDA/vararg.cu Index: test/SemaCUDA/vararg.cu =

<    3   4   5   6   7   8   9   >