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

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 ) const { + if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid()) +return; tra wrote: > I'd rename

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

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

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

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

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

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)">;

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

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

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 ___

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

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

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

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

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

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] 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=44309#toc Repository: rL LLVM

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

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=44341#toc Repository: rL LLVM

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=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] 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 ) const { + if

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

[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

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=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/ToolChain.h

[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

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

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:

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

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

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

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-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=44566#toc Repository: rL LLVM

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

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:

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=44569#toc Repository: rL

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=rev Log: Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam. Summary: Explicit is better than implicit. Reviewers: echristo Subscribers:

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

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

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

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

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

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] 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=44568#toc Repository: rL LLVM http://reviews.llvm.org/D16078

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

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

[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

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

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

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

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=44675#toc Repository: rL LLVM

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

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

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

[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

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

[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

Re: [PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.

2016-06-03 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaDeclAttr.cpp:4044 @@ +4043,3 @@ +// Checks whether an argument of launch_bounds attribute is +// acceptable, performs implicit conversion to Rvalue and returns +// non-nullptr

Re: [PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.

2016-06-03 Thread Justin Lebar via cfe-commits
jlebar added a comment. How is this different from test/SemaCUDA/launch_bounds.cu:27-28? It does const int constint = 512; __launch_bounds__(constint) void TestConstInt(void); which looks verbatim the same as this testcase. http://reviews.llvm.org/D20985

Re: [PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.

2016-06-03 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D20985#448836, @tra wrote: > In http://reviews.llvm.org/D20985#448822, @jlebar wrote: > > > How is this different from test/SemaCUDA/launch_bounds.cu:27-28? It does > > > > const int constint = 512; > > __launch_bounds__(constint) void

[PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-08 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, jholewinski. Clang changes to make use of the LLVM intrinsics added in D21160. http://reviews.llvm.org/D21162 Files: include/clang/Basic/BuiltinsNVPTX.def lib/Headers/__clang_cuda_intrinsics.h

Re: [PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. (Art, I would appreciate a second set of eyes on this one, as the last time I did this -- with ldg -- I messed up pretty badly.) http://reviews.llvm.org/D21162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you for the reviews, Justin! http://reviews.llvm.org/D21162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r272299 - [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Jun 9 15:04:57 2016 New Revision: 272299 URL: http://llvm.org/viewvc/llvm-project?rev=272299=rev Log: [CUDA] Implement __shfl* intrinsics in clang headers. Summary: Clang changes to make use of the LLVM intrinsics added in D21160. Reviewers: tra Subscribers:

Re: [PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272299: [CUDA] Implement __shfl* intrinsics in clang headers. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21162?vs=60223=60230#toc Repository: rL LLVM

Re: [PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Headers/__clang_cuda_intrinsics.h:77-80 @@ +76,6 @@ +_Static_assert(sizeof(__tmp) == sizeof(__in)); \ +memcpy(&__tmp, &__in, sizeof(__in)); \ +__tmp =

Re: [PATCH] D21162: [CUDA] Implement __shfl* intrinsics in clang headers.

2016-06-09 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 60223. jlebar marked 2 inline comments as done. jlebar added a comment. Update after tra's review. http://reviews.llvm.org/D21162 Files: include/clang/Basic/BuiltinsNVPTX.def lib/Headers/__clang_cuda_intrinsics.h

Re: [PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.

2016-06-03 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:4079 @@ +4078,3 @@ + if (ValArg.isInvalid()) +return nullptr; + OK, so then we want an assert, not an if? http://reviews.llvm.org/D20985 ___

[PATCH] D21337: [CUDA] Give templated device functions internal linkage, templated kernels external linkage.

2016-06-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rsmith. jlebar added subscribers: tra, cfe-commits. This lets LLVM perform IPO over these functions. In particular, it allows LLVM to emit ld.global.nc for loads to __restrict pointers in kernels that are never written to.

Re: [PATCH] D21337: [CUDA] Give templated device functions internal linkage, templated kernels external linkage.

2016-06-14 Thread Justin Lebar via cfe-commits
jlebar added a comment. tra makes the good point that maybe this should be done in ASTContext, where we already have a special case for __global__. (I think I gravitated to doing it this way because the GVA* enums have zero documentation -- at least I have a vague idea of what the LLVM

[PATCH] D20794: [CUDA] Fix order of vectorized ldg intrinsics' elements.

2016-05-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added subscribers: tra, cfe-commits. The order is [x, y, z, w], not [w, x, y, z]. http://reviews.llvm.org/D20794 Files: lib/Headers/__clang_cuda_intrinsics.h Index: lib/Headers/__clang_cuda_intrinsics.h

r271215 - [CUDA] Fix order of vectorized ldg intrinsics' elements.

2016-05-30 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon May 30 12:12:55 2016 New Revision: 271215 URL: http://llvm.org/viewvc/llvm-project?rev=271215=rev Log: [CUDA] Fix order of vectorized ldg intrinsics' elements. Summary: The order is [x, y, z, w], not [w, x, y, z]. Subscribers: cfe-commits, tra Differential Revision:

Re: [PATCH] D20794: [CUDA] Fix order of vectorized ldg intrinsics' elements.

2016-05-30 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271215: [CUDA] Fix order of vectorized ldg intrinsics' elements. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D20794?vs=58972=58976#toc Repository: rL LLVM

[PATCH] D20836: [CUDA] Conservatively mark inline asm as convergent.

2016-05-31 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. This is particularly important because a some convergent CUDA intrinsics (e.g. __shfl_down) are implemented in terms of inline asm. http://reviews.llvm.org/D20836 Files: lib/CodeGen/CGStmt.cpp

r271336 - [CUDA] Conservatively mark inline asm as convergent.

2016-05-31 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue May 31 16:27:13 2016 New Revision: 271336 URL: http://llvm.org/viewvc/llvm-project?rev=271336=rev Log: [CUDA] Conservatively mark inline asm as convergent. Summary: This is particularly important because a some convergent CUDA intrinsics (e.g. __shfl_down) are

Re: [PATCH] D20836: [CUDA] Conservatively mark inline asm as convergent.

2016-05-31 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271336: [CUDA] Conservatively mark inline asm as convergent. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D20836?vs=59130=59133#toc Repository: rL LLVM

Re: [PATCH] D20836: [CUDA] Conservatively mark inline asm as convergent.

2016-05-31 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D20836#444911, @tra wrote: > I guess we would not be able to remove convergent from inline asm > automatically. Do we need a way to explicitly remove convergent from inline > asm? We can think about it. I'm not sure it will make a big

Re: r271336 - [CUDA] Conservatively mark inline asm as convergent.

2016-06-01 Thread Justin Lebar via cfe-commits
Thank you, Tom. I will have a look. On Wed, Jun 1, 2016 at 11:22 AM, Tom Stellard <t...@stellard.net> wrote: > On Tue, May 31, 2016 at 09:27:13PM -0000, Justin Lebar via cfe-commits wrote: >> Author: jlebar >> Date: Tue May 31 16:27:13 2016 >> New Revision: 271336

Re: [PATCH] D21507: Changes after running check modernize-use-emplace (D20964)

2016-06-20 Thread Justin Lebar via cfe-commits
jlebar added a subscriber: jlebar. jlebar added a comment. There seem to be many nontrivial whitespace errors introduced by this patch. For example, -Attrs.push_back(HTMLStartTagComment::Attribute(Ident.getLocation(), -

[PATCH] D21419: [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: echristo, cfe-commits. Previously if you did e.g. $ clang -march=haswell -x cuda foo.cu we would pass "-march=haswell -march=sm_20" down to the ptxas tool. This causes it to assert, and rightly so!

Re: [PATCH] D21419: [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 60931. jlebar added a comment. Remove redundant test. http://reviews.llvm.org/D21419 Files: lib/Driver/ToolChains.cpp test/Driver/cuda-march.cu Index: test/Driver/cuda-march.cu === ---

Re: [PATCH] D21419: [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/Driver/cuda-march.cu:15-16 @@ +14,4 @@ + +// RUN: %clang -### -target x86_64-linux-gnu -c -march=skylake --cuda-gpu-arch=sm_30 %s 2>&1 | \ +// RUN: FileCheck -check-prefix SKYLAKE -check-prefix SM30 %s + tra wrote:

Re: [PATCH] D21419: [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 60932. jlebar added a comment. Fix tests for real this time. http://reviews.llvm.org/D21419 Files: lib/Driver/ToolChains.cpp test/Driver/cuda-march.cu Index: test/Driver/cuda-march.cu ===

r272857 - [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Jun 15 18:46:11 2016 New Revision: 272857 URL: http://llvm.org/viewvc/llvm-project?rev=272857=rev Log: [CUDA] Don't pass top-level -march down to device cc1 or ptxas. Summary: Previously if you did e.g. $ clang -march=haswell -x cuda foo.cu we would pass

Re: [PATCH] D21419: [CUDA] Don't pass top-level -march down to device cc1 or ptxas.

2016-06-15 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272857: [CUDA] Don't pass top-level -march down to device cc1 or ptxas. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D21419?vs=60932=60935#toc Repository: rL LLVM

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

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

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

2016-01-15 Thread Justin Lebar via cfe-commits
000gn/T/hello_world-1b17ac.out and >> /var/folders/pb/95pc7qfx2xl9kr9kg0gg_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 >> invoca

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

2016-01-15 Thread Justin Lebar via cfe-commits
pc7qfx2xl9kr9kg0gg_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 w

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

  1   2   3   4   5   6   7   8   9   >