r319909 - [NVPTX, CUDA] Added llvm.nvvm.fns intrinsic and matching __nvvm_fns builtin in clang.

2017-12-06 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Dec 6 09:50:05 2017 New Revision: 319909 URL: http://llvm.org/viewvc/llvm-project?rev=319909=rev Log: [NVPTX,CUDA] Added llvm.nvvm.fns intrinsic and matching __nvvm_fns builtin in clang. Differential Revision: https://reviews.llvm.org/D40872 Modified:

r319908 - [CUDA] Added overloads for '[unsigned] long' variants of shfl builtins.

2017-12-06 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Dec 6 09:40:35 2017 New Revision: 319908 URL: http://llvm.org/viewvc/llvm-project?rev=319908=rev Log: [CUDA] Added overloads for '[unsigned] long' variants of shfl builtins. Differential Revision: https://reviews.llvm.org/D40871 Modified:

r319485 - [CUDA] Tweak CUDA wrappers to make cuda-9 work with libc++

2017-11-30 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Nov 30 14:22:21 2017 New Revision: 319485 URL: http://llvm.org/viewvc/llvm-project?rev=319485=rev Log: [CUDA] Tweak CUDA wrappers to make cuda-9 work with libc++ CUDA-9 headers check for specific libc++ version and ifdef out some of the definitions we need if LIBCPP_VERSION

r319201 - [CUDA] Report "unsupported VLA" errors only on device side.

2017-11-28 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Nov 28 10:51:42 2017 New Revision: 319201 URL: http://llvm.org/viewvc/llvm-project?rev=319201=rev Log: [CUDA] Report "unsupported VLA" errors only on device side. This fixes erroneously reported CUDA compilation errors in host-side code during device-side compilation. I've

Re: r318601 - [OpenMP] Show error if VLAs are not supported

2017-11-20 Thread Artem Belevich via cfe-commits
Proposed fix: https://reviews.llvm.org/D40275 On Mon, Nov 20, 2017 at 4:13 PM, Artem Belevich wrote: > This change breaks CUDA as clang now reports an error during device-side > compilation when VLA is used in the *host-side* code. >

Re: r318601 - [OpenMP] Show error if VLAs are not supported

2017-11-20 Thread Artem Belevich via cfe-commits
This change breaks CUDA as clang now reports an error during device-side compilation when VLA is used in the *host-side* code. http://lab.llvm.org:8011/builders/clang-cuda-build/builds/15591/steps/ninja%20build%20simple%20CUDA%20tests/logs/stdio E.g. I would expect this code to compile

r315624 - [CUDA] Added __hmma_m16n16k16_* builtins to support mma instructions on sm_70

2017-10-12 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Oct 12 14:32:19 2017 New Revision: 315624 URL: http://llvm.org/viewvc/llvm-project?rev=315624=rev Log: [CUDA] Added __hmma_m16n16k16_* builtins to support mma instructions on sm_70 Differential Revision: https://reviews.llvm.org/D38742 Added:

r314334 - [CUDA] Work around conflicting function definitions in CUDA-9 headers.

2017-09-27 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 27 12:07:15 2017 New Revision: 314334 URL: http://llvm.org/viewvc/llvm-project?rev=314334=rev Log: [CUDA] Work around conflicting function definitions in CUDA-9 headers. Differential Revision: https://reviews.llvm.org/D38326 Modified:

r314135 - [NVPTX] added match.{any, all}.sync instructions, intrinsics & builtins.

2017-09-25 Thread Artem Belevich via cfe-commits
Author: tra Date: Mon Sep 25 11:53:57 2017 New Revision: 314135 URL: http://llvm.org/viewvc/llvm-project?rev=314135=rev Log: [NVPTX] added match.{any,all}.sync instructions, intrinsics & builtins. Differential Revision: https://reviews.llvm.org/D38191 Modified:

r314129 - [CUDA] Fix names of __nvvm_vote* intrinsics.

2017-09-25 Thread Artem Belevich via cfe-commits
Author: tra Date: Mon Sep 25 10:55:26 2017 New Revision: 314129 URL: http://llvm.org/viewvc/llvm-project?rev=314129=rev Log: [CUDA] Fix names of __nvvm_vote* intrinsics. Also fixed a syntax error in activemask(). Differential Revision: https://reviews.llvm.org/D38188 Modified:

r313899 - [CUDA] Fixed order of words in the names of shfl builtins.

2017-09-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Sep 21 11:46:39 2017 New Revision: 313899 URL: http://llvm.org/viewvc/llvm-project?rev=313899=rev Log: [CUDA] Fixed order of words in the names of shfl builtins. Differential Revision: https://reviews.llvm.org/D38147 Modified:

r313898 - [NVPTX] Implemented bar.warp.sync, barrier.sync, and vote{.sync} instructions/intrinsics/builtins.

2017-09-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Sep 21 11:44:49 2017 New Revision: 313898 URL: http://llvm.org/viewvc/llvm-project?rev=313898=rev Log: [NVPTX] Implemented bar.warp.sync, barrier.sync, and vote{.sync} instructions/intrinsics/builtins. Differential Revision: https://reviews.llvm.org/D38148 Modified:

r313820 - [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 20 14:23:07 2017 New Revision: 313820 URL: http://llvm.org/viewvc/llvm-project?rev=313820=rev Log: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins. Differential Revision: https://reviews.llvm.org/D38090 Added:

r313369 - [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Sep 15 10:30:53 2017 New Revision: 313369 URL: http://llvm.org/viewvc/llvm-project?rev=313369=rev Log: [CUDA] Work around a new quirk in CUDA9 headers. In CUDA-9 some of device-side math functions that we need are conditionally defined within '#if _GLIBCXX_MATH_H'. We need

r312734 - [CUDA] Added rudimentary support for CUDA-9 and sm_70.

2017-09-07 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Sep 7 11:14:32 2017 New Revision: 312734 URL: http://llvm.org/viewvc/llvm-project?rev=312734=rev Log: [CUDA] Added rudimentary support for CUDA-9 and sm_70. For now CUDA-9 is not included in the list of CUDA versions clang searches for, so the path to CUDA-9 must be

r308675 - [NVPTX] Add lowering of i128 params.

2017-07-20 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Jul 20 14:16:03 2017 New Revision: 308675 URL: http://llvm.org/viewvc/llvm-project?rev=308675=rev Log: [NVPTX] Add lowering of i128 params. The patch adds support of i128 params lowering. The changes are quite trivial to support i128 as a "special case" of integer type.

r290982 - [CUDA] Pre-include sm_60 and sm_61 headers.

2017-01-04 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Jan 4 12:39:29 2017 New Revision: 290982 URL: http://llvm.org/viewvc/llvm-project?rev=290982=rev Log: [CUDA] Pre-include sm_60 and sm_61 headers. CUDA-8.0 comes with new headers which nvcc pre-includes via cuda_runtime.h Clang now makes them available as well.

r289287 - [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Dec 9 16:59:17 2016 New Revision: 289287 URL: http://llvm.org/viewvc/llvm-project?rev=289287=rev Log: [CUDA,Driver] Added --no-cuda-gpu-arch= option. This allows us to negate preceding --cuda-gpu-arch=X. This comes handy when user needs to override default flags set for

r288962 - [CUDA] Improve target attribute checking for function templates.

2016-12-07 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Dec 7 13:27:16 2016 New Revision: 288962 URL: http://llvm.org/viewvc/llvm-project?rev=288962=rev Log: [CUDA] Improve target attribute checking for function templates. * __host__ __device__ functions are no longer considered to be redeclarations of __host__ or __device__

r288406 - Send compiler output to /dev/null in defsym.s test.

2016-12-01 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Dec 1 13:34:35 2016 New Revision: 288406 URL: http://llvm.org/viewvc/llvm-project?rev=288406=rev Log: Send compiler output to /dev/null in defsym.s test. Fixes test failures if tests are run in a read-only source tree. Modified: cfe/trunk/test/Driver/defsym.s

[PATCH] D26774: [CUDA] Driver changes to support CUDA compilation on MacOS.

2016-11-17 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM, with couple of minor nits. Comment at: clang/lib/Driver/Driver.cpp:3650-3654 + + // Intentionally omitted from the switch above: llvm::Triple::CUDA. CUDA + // compiles

[PATCH] D26268: [CUDA] Use only the GVALinkage on function definitions.

2016-11-08 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/SemaCUDA/add-inline-in-definition.cu:13-14 +// +// The trickiness here comes from the fact that the FunctionDecl bar() sees for +// foo() does not

[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-25 Thread Artem Belevich via cfe-commits
tra added a comment. I'm OK with the change, but the comments suggest that things may be more complicated. How about disabling assert for CUDA only? https://reviews.llvm.org/D25640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-25 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75816. tra added a comment. - handle using declarations found in the overload set we check. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-25 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75812. tra added a comment. - Instead of relying on the first attribute we find, check all matching ones. - Specializations inherit their target attributes from their base template only. Their effective target always matches that of the template and is no

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Artem Belevich via cfe-commits
tra added a comment. CodeGen's CMakeLists.txt needs to be updated to link with clangAnalysis now, otherwise it breaks builds that use shared libraries. Fixed in r285037. diff --git a/lib/CodeGen/CMakeLists.txt b/lib/CodeGen/CMakeLists.txt index f5d5d69..9cf34f6 100644 ---

r285037 - Link clangCodeGen with clangAnalysis required after r284990.

2016-10-24 Thread Artem Belevich via cfe-commits
Author: tra Date: Mon Oct 24 17:52:39 2016 New Revision: 285037 URL: http://llvm.org/viewvc/llvm-project?rev=285037=rev Log: Link clangCodeGen with clangAnalysis required after r284990. Fixes build break for configurations that use shared libraries. Modified:

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:791 + CUDAFunctionTarget NewTarget = IdentifyCUDATarget(NewFD); + for (auto OldND : Previous) { +FunctionDecl *OldFD = OldND->getAsFunction(); jlebar wrote: > tra wrote: > > jlebar wrote: > > >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75652. tra marked an inline comment as done. tra added a comment. Addressed remaining nits. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75516. tra added a comment. removed pragma check from IdentifyCUDATarget for real. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; jlebar wrote: > Checking ForceCUDAHostDeviceDepth here is...yeah. Especially because the >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75515. tra marked 5 inline comments as done. tra added a comment. addressed jlebar's comments. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: include/clang/Sema/Sema.h:9396 + CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, +bool IgnoreImplicitHDAttr = false); CUDAFunctionTarget IdentifyCUDATarget(const AttributeList *Attr);

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75511. tra marked 5 inline comments as done. tra added a comment. addressed jlebar's comments. https://reviews.llvm.org/D25845 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaTemplate.cpp

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra added a comment. In https://reviews.llvm.org/D25845#576819, @jlebar wrote: > > This patch changes the way we match target attributes of base template vs > > attributes used in explicit instantiation or specialization so that only > > explicitly specified attributes are considered. > >

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75482. tra added a comment. Added a comment explaining expected constexpr function template matching behavior. https://reviews.llvm.org/D25845 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaTemplate.cpp

r284879 - Declare H and H new/delete.

2016-10-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Oct 21 15:34:05 2016 New Revision: 284879 URL: http://llvm.org/viewvc/llvm-project?rev=284879=rev Log: Declare H and H new/delete. Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp cfe/trunk/test/SemaCUDA/overloaded-delete.cu Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp

[PATCH] D25839: Removed unused function argument. NFC.

2016-10-21 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284843: Removed unused function argument. NFC. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D25839?vs=75339=75447#toc Repository: rL LLVM https://reviews.llvm.org/D25839

r284843 - Removed unused function argument. NFC.

2016-10-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Oct 21 12:15:46 2016 New Revision: 284843 URL: http://llvm.org/viewvc/llvm-project?rev=284843=rev Log: Removed unused function argument. NFC. Differential Revision: https://reviews.llvm.org/D25839 Modified: cfe/trunk/include/clang/Sema/Sema.h

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-20 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, rsmith. tra added a subscriber: cfe-commits. Some functions and templates are treated as `__host__` `__device__` even when they don't have explicitly specified target attributes. What's worse, this treatment may change depending on command

[PATCH] D25839: Removed unused function argument. NFC.

2016-10-20 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. https://reviews.llvm.org/D25839 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp Index: lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-19 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, rsmith. tra added a subscriber: cfe-commits. Current behavior: - __host__ __device__ (HD) functions are considered to be redeclarations of `__host__` (H) of `__device__` (D) functions with same signature. - Target attributes are not taken

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-19 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. Implicit functions are treated as if they were __host__ __device__ and clang does not allow overloading those with __host__ or __device__ variants. In order for users to provide their own standard

[PATCH] D25755: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change.

2016-10-18 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D25755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r283964 - Added REQUIRED triples to the test that fails on some ARM buildbots.

2016-10-11 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Oct 11 21:08:08 2016 New Revision: 283964 URL: http://llvm.org/viewvc/llvm-project?rev=283964=rev Log: Added REQUIRED triples to the test that fails on some ARM buildbots. Modified: cfe/trunk/test/SemaCUDA/function-overload-hd.cu Modified:

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra added inline comments. > jlebar wrote in DiagnosticSemaKinds.td:6727 > That's still a "global variable"? Or do you think calling it such will be > confusing? It's not clear whether you mean global storage class or global namespace. The code checks for global storage, but error message is

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. > DiagnosticSemaKinds.td:6727 > def err_cuda_extern_shared : Error<"__shared__ variable %0 cannot be > 'extern'">; > +def err_cuda_nonglobal_constant : Error<"__constant__ variables must

[PATCH] D25125: [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a reviewer: tra. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D25125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D25036: [CUDA] Disallow exceptions in device code.

2016-09-28 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. One question, LGTM otherwise. Comment at: clang/lib/Sema/SemaExprCXX.cpp:688 @@ +687,3 @@ + if (getLangOpts().CUDA) +CheckCUDAExceptionExpr(OpLoc, "throw"); +

Re: [PATCH] D24946: [CUDA] Added support for CUDA-8

2016-09-28 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282610: [CUDA] Added support for CUDA-8 (authored by tra). Changed prior to commit: https://reviews.llvm.org/D24946?vs=72707=72863#toc Repository: rL LLVM https://reviews.llvm.org/D24946 Files:

Re: [PATCH] D24944: [CUDA] Added __nvvm_atom_{sys|cta}_* builtins for sm_60 GPUs.

2016-09-28 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282609: [CUDA] added __nvvm_atom_{sys|cta}_* builtins. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D24944?vs=72584=72862#toc Repository: rL LLVM

r282610 - [CUDA] Added support for CUDA-8

2016-09-28 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 28 12:47:40 2016 New Revision: 282610 URL: http://llvm.org/viewvc/llvm-project?rev=282610=rev Log: [CUDA] Added support for CUDA-8 Differential Revision: https://reviews.llvm.org/D24946 Added:

r282609 - [CUDA] added __nvvm_atom_{sys|cta}_* builtins.

2016-09-28 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 28 12:47:35 2016 New Revision: 282609 URL: http://llvm.org/viewvc/llvm-project?rev=282609=rev Log: [CUDA] added __nvvm_atom_{sys|cta}_* builtins. These builtins are available on sm_60+ GPU only. Differential Revision: https://reviews.llvm.org/D24944 Modified:

Re: [PATCH] D24946: [CUDA] Added support for CUDA-8

2016-09-27 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 72707. tra added a comment. addressed Justin's comments. https://reviews.llvm.org/D24946 Files: lib/Driver/ToolChains.cpp lib/Headers/__clang_cuda_runtime_wrapper.h test/Driver/Inputs/CUDA/usr/local/cuda/nvvm/libdevice/libdevice.compute_20.10.bc

Re: [PATCH] D24946: [CUDA] Added support for CUDA-8

2016-09-27 Thread Artem Belevich via cfe-commits
tra marked an inline comment as done. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:156 @@ +155,3 @@ +#endif +#endif + jlebar wrote: > I don't understand what we are doing here... > > We're saying, if __USE_FAST_MATH__ is defined, and if it's not equal

Re: [PATCH] D24977: [CUDA] Declare our __device__ math functions in the same inline namespace as our standard library.

2016-09-27 Thread Artem Belevich via cfe-commits
tra added a comment. OK. https://reviews.llvm.org/D24977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24979: [CUDA] Support and std::min/max on the device.

2016-09-27 Thread Artem Belevich via cfe-commits
tra added a subscriber: echristo. tra added a comment. This looks like fix-includes and it may be somewhat shaky if users start messing with include paths. You may want to get @echristo's input on that. I' personally would prefer to force-include these files. I suspect it will not change

Re: [PATCH] D24977: [CUDA] Declare our __device__ math functions in the same inline namespace as our standard library.

2016-09-27 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. That is way too much knowledge about details of standard library implementation. If it changes, I suspect users will end up with a rather uninformative error. Is there a way to produce somewhat more

Re: [PATCH] D24975: [CUDA] Add #pragma clang force_cuda_host_device_{begin, end} pragmas.

2016-09-27 Thread Artem Belevich via cfe-commits
tra added a comment. LGTM. Should we add new pragma description to docs/LanguageExtensions.rst ? https://reviews.llvm.org/D24975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24946: [CUDA] Added support for CUDA-8

2016-09-26 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. Herald added a subscriber: jlebar. https://reviews.llvm.org/D24946 Files: lib/Driver/ToolChains.cpp lib/Headers/__clang_cuda_runtime_wrapper.h

[PATCH] D24944: [CUDA] Added __nvvm_atom_{sys|cta}_* builtins for sm_60 GPUs.

2016-09-26 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. Herald added subscribers: jlebar, jholewinski. https://reviews.llvm.org/D24944 Files: include/clang/Basic/BuiltinsNVPTX.def lib/Basic/Targets.cpp lib/CodeGen/CGBuiltin.cpp

r281557 - Revert r281457 "Supports adding insertion around non-insertion replacements."

2016-09-14 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 14 18:03:06 2016 New Revision: 281557 URL: http://llvm.org/viewvc/llvm-project?rev=281557=rev Log: Revert r281457 "Supports adding insertion around non-insertion replacements." Commit was breaking our internal tests. Modified:

Re: [PATCH] D24590: [test-suite] [CUDA] Update README.

2016-09-14 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM Comment at: External/CUDA/README:58 @@ +57,3 @@ + There's a cuda-tests-simple target that excludes tests that take a long time + to build (thrust). + It may

Re: [PATCH] D24589: [test-suite] [CUDA] Add and tests.

2016-09-14 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D24589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D24588: [CUDA] Make __clang_cuda_cmath.h compatible with libc++.

2016-09-14 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D24588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D24581: [CUDA] Add test checking our ability to take a function pointer to a __global__ function on the host side.

2016-09-14 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D24581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.

2016-09-13 Thread Artem Belevich via cfe-commits
Thanks for the quick fix. ASAN is happy now. --Artem On Tue, Sep 13, 2016 at 3:09 PM, Manman <m...@apple.com> wrote: > I checked in r281404. Hopefully it will fix the issue. > > Let me know if it does not. > > Thanks, > Manman > > On Sep 13, 2016, at 3:03 PM,

Re: [PATCH] D24522: [CUDA] Do not merge CUDA target attributes.

2016-09-13 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281406: [CUDA] Do not merge CUDA target attributes. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D24522?vs=71244=71249#toc Repository: rL LLVM

r281406 - [CUDA] Do not merge CUDA target attributes.

2016-09-13 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Sep 13 17:16:30 2016 New Revision: 281406 URL: http://llvm.org/viewvc/llvm-project?rev=281406=rev Log: [CUDA] Do not merge CUDA target attributes. CUDA target attributes are used for function overloading and must not be merged. This fixes a bug where attributes were

Re: [PATCH] D24522: [CUDA] Do not merge CUDA target attributes.

2016-09-13 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 71244. tra marked an inline comment as done. tra added a comment. Removed REQUIRED lines. https://reviews.llvm.org/D24522 Files: lib/Sema/SemaDecl.cpp test/SemaCUDA/function-overload.cu test/SemaCUDA/target_attr_inheritance.cu Index:

Re: r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.

2016-09-13 Thread Artem Belevich via cfe-commits
Manman, FYI, It appears that some of your ObjC commits today trigger asan error. Sanitizer bots are broken by PR30341, so they don't report the issue yet. --Artem $ llvm/tools/clang/clang -cc1 -internal-isystem llvm/tools/clang/staging/include -nostdsysteminc -fblocks -fsyntax-only

[PATCH] D24522: [CUDA] Do not merge CUDA target attributes.

2016-09-13 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. Herald added a subscriber: jlebar. CUDA target attributes are used for function overloading and must not be merged. This fixes a bug where attributes were inherited during function template

Re: [PATCH] D24407: [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.

2016-09-09 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D24407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23526: [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-22 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL279455: [CUDA] Collapsed offload actions should not be top-level jobs. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D23526?vs=68100=68896#toc Repository: rL LLVM

r279455 - [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-22 Thread Artem Belevich via cfe-commits
Author: tra Date: Mon Aug 22 13:50:34 2016 New Revision: 279455 URL: http://llvm.org/viewvc/llvm-project?rev=279455=rev Log: [CUDA] Collapsed offload actions should not be top-level jobs. If they are, we end up with the last intermediary output preserved in the current directory after

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM, but we may want someone familiar with math library to take a look. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133 @@ -122,8 +124,11 @@ __DEVICE__ float

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133 @@ -122,8 +124,11 @@ __DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); } -__DEVICE__ float nexttoward(float __from, float __to) { +__DEVICE__ float

Re: [PATCH] D23526: [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-15 Thread Artem Belevich via cfe-commits
tra marked 2 inline comments as done. tra added a comment. https://reviews.llvm.org/D23526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23526: [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-15 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 68100. tra added a comment. Addressed comments. https://reviews.llvm.org/D23526 Files: lib/Driver/Driver.cpp test/Driver/cuda-bindings.cu Index: test/Driver/cuda-bindings.cu === --- /dev/null

[PATCH] D23526: [CUDA] Collapsed offload actions should not be top-level jobs.

2016-08-15 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, sfantao. tra added a subscriber: cfe-commits. If they are, we end up with the last intermediary output preserved in the current directory after compilation. Added a test case to verify that we're using appropriate filenames for outputs of

Re: [PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-12 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. tra marked an inline comment as done. Closed by commit rL278549: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8. (authored by tra). Changed prior to commit:

r278549 - [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-12 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Aug 12 13:44:01 2016 New Revision: 278549 URL: http://llvm.org/viewvc/llvm-project?rev=278549=rev Log: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8. This matches the way nvcc encapsulates GPU binaries into host object file. Now cuobjdump can deal with

Re: [PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-12 Thread Artem Belevich via cfe-commits
tra marked an inline comment as done. Comment at: lib/CodeGen/CGCUDANV.cpp:62-69 @@ -60,3 +61,10 @@ llvm::ConstantInt::get(SizeTy, 0)}; auto ConstStr = CGM.GetAddrOfConstantCString(Str, Name.c_str()); +llvm::GlobalVariable *GV = +

Re: [PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-12 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 67851. tra added a comment. Reverted argument type to std::string https://reviews.llvm.org/D23429 Files: lib/CodeGen/CGCUDANV.cpp test/CodeGenCUDA/device-stub.cu Index: test/CodeGenCUDA/device-stub.cu

Re: [PATCH] D23341: [CUDA] Include CUDA headers before anything else.

2016-08-11 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. OK. This should help with PR26966. https://reviews.llvm.org/D23341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.

2016-08-11 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. This matches the way nvcc encapsulates GPU binaries into host object file. Now cuobjdump can deal with clang-compiled object files. https://reviews.llvm.org/D23429 Files: lib/CodeGen/CGCUDANV.cpp

Re: [PATCH] D23335: [CUDA] Reject calls to __device__ functions from host variable global initializers.

2016-08-09 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/SemaCUDA/global-initializers-host.cu:2 @@ +1,3 @@ +// RUN: %clang_cc1 %s --std=c++11 -triple x86_64-linux-unknown -emit-llvm -o - -verify + +#include

Re: [PATCH] D22946: [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.

2016-08-09 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D22946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D22946: [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.

2016-08-09 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: test/Driver/cuda-detect.cu:75-77 @@ -74,1 +74,5 @@ +// Verify that compiler accepts CUDA syntax with "-x cuda-cpp-output". +// RUN: %clang -Werror -fsyntax-only -x cuda-cpp-output -c %s +// +// Verify that C++ include paths are passed for

Re: [PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-09 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D23239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23242: [CUDA] Raise an error if a wrong-side call is codegen'ed.

2016-08-08 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Few nits, but looks good otherwise. Should be add few tests for calling device functions from host-side global initializers? Perhaps for device->host, too, as there may be unexpected interplay with

Re: [PATCH] D22946: [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.

2016-08-08 Thread Artem Belevich via cfe-commits
tra added a comment. cuda-detect.cu may be a better place for this test. Comment at: test/Driver/cuda-simple.cu:27 @@ -16,1 +26,3 @@ +// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64--linux-gnu" {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8" +// CHECK-CXXINCLUDE:

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-08 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2886 @@ +2885,3 @@ + // Check if this function has diagnostics that should be emitted when we + // codegen it. If so, don't eit this function definition, but don't emit the + // diags just yet.

Re: [PATCH] D23240: [CUDA] Print a "previous-decl" note when calling an illegal member fn.

2016-08-08 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D23240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23239: [CUDA] Add __device__ overloads for placement new and delete.

2016-08-08 Thread Artem Belevich via cfe-commits
tra added a comment. I think we need to add `noexcept` for these in c++11. https://reviews.llvm.org/D23239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23238: [CUDA] Rename CheckCUDATarget to IsAllowedCUDACall. NFC

2016-08-08 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D23238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r277542 - [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
i Artem, >> >> This broke >> http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/26856 >> , >> can you take a look? >> >> Thanks, >> >> On Tue, Aug 2, 2016 at 4:12 PM, Artem Belevich via cfe-commits >> <cfe-commi

r277552 - [CUDA] Updated CUDA tests that must run w/o CUDA installation.

2016-08-02 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Aug 2 18:43:04 2016 New Revision: 277552 URL: http://llvm.org/viewvc/llvm-project?rev=277552=rev Log: [CUDA] Updated CUDA tests that must run w/o CUDA installation. Fixes test failures after r277542 on systems that don't have CUDA installed. Modified:

Re: r277542 - [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
? > > Thanks, > > On Tue, Aug 2, 2016 at 4:12 PM, Artem Belevich via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > Author: tra > > Date: Tue Aug 2 18:12:51 2016 > > New Revision: 277542 > > > > URL: http://llvm.org/viewvc/llvm-project?rev

Re: [PATCH] D23037: [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277542: [CUDA] Fix libdevice selection. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D23037?vs=66579=66589#toc Repository: rL LLVM https://reviews.llvm.org/D23037 Files:

<    1   2   3   4   5   6   7   8   9   >