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

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:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

[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] 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] 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] 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:

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

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] 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] 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:/

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

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:

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

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 __

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

[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

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

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

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

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

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

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

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

[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] 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 _

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

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

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

<    4   5   6   7   8   9