Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: include/clang/Sema/Sema.h:8599 @@ +8598,3 @@ +CFP_Never, // Invalid caller/callee combination. +CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on +// -fcuda-disable-target-call-checks option -

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 33654. tra marked 2 inline comments as done. tra added a comment. addressed eliben@'s comments. http://reviews.llvm.org/D12453 Files: include/clang/Basic/Builtins.h include/clang/Basic/LangOptions.def include/clang/Driver/CC1Options.td include/clang/Sem

Re: [PATCH] D11664: [CUDA] Implemented additional processing steps needed to link with CUDA libdevice bitcode.

2015-09-01 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 33713. tra added a comment. Updated the patch to use bitcode linker to perform selective linking and internalizing. Removed Internalize+GDCE passes. http://reviews.llvm.org/D11664 Files: include/clang/Basic/LangOpti

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 33741. tra marked an inline comment as done. tra added a comment. Removed builtin-related changes(http://reviews.llvm.org/D12122). Will commit them separately. Added more test cases. Addressed eliben@'s comments. http:

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Artem Belevich via cfe-commits
tra marked 2 inline comments as done. Comment at: lib/Sema/SemaCUDA.cpp:106 @@ +105,3 @@ + + // (a) Can't call global from global until we support dynamic execution. + if (CalleeTarget == CFT_Global && eliben wrote: > Not just global from global. global from dev

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-04 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 34059. tra marked 2 inline comments as done. tra added a comment. Added more test cases to cover constructor/destructor/new/delete. Refactored code to remove unwanted CUDA functions from Lookup match results. Disabled HD overloading of H or H destructors to guaran

Re: [PATCH] D9888: [OPENMP] Driver support for OpenMP offloading

2015-10-07 Thread Artem Belevich via cfe-commits
tra added a comment. In http://reviews.llvm.org/D9888#257904, @sfantao wrote: > This diff refactors the original patch and is rebased on top of the latests > offloading changes inserted for CUDA. > > Here I don't touch the CUDA support. I tried, however, to have the > implementation modular eno

Re: r250514 - PS4: Make sure to add the sanitizer runtime before any linker input

2015-10-16 Thread Artem Belevich via cfe-commits
Filipe, FYI, this change appears to introduce a somewhat subtle problem. clang compiled with itself starts producing (false positive?) warnings about uninitialized variables. I didn't get a chance to dig deeper yet. --Artem On Fri, Oct 16, 2015 at 8:07 AM, Filipe Cabecinhas via cfe-commits < cfe

Re: r250514 - PS4: Make sure to add the sanitizer runtime before any linker input

2015-10-19 Thread Artem Belevich via cfe-commits
> On Fri, Oct 16, 2015 at 11:52 PM, Artem Belevich via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Filipe, >> >> FYI, this change appears to introduce a somewhat subtle problem. clang >> compiled with itself starts producing (false positive?) warni

Re: [PATCH] D13171: [CUDA] Added a wrapper header for inclusion of stock CUDA headers.

2015-10-20 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 37912. tra added a comment. Herald added a subscriber: klimek. Changed header wrapping strategy. Previous version was attempting to make CUDA headers work for host/device compilations separately. In the end host and device compilations ended up with different view

[PATCH] D13913: Allow linking multiple bitcode files.

2015-10-20 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: echristo, pcc. tra added a subscriber: cfe-commits. This will be used for CUDA where we need to link with vendor-supplied bitcode library and with a bitcode library pretending to be libm for GPUs. Linking options for particular file depend on the

Re: [PATCH] D13171: [CUDA] Added a wrapper header for inclusion of stock CUDA headers.

2015-10-21 Thread Artem Belevich via cfe-commits
tra added a comment. In http://reviews.llvm.org/D13171#272397, @echristo wrote: > I'm ignoring the content of the header, but this seems to be a not terrible > way to do things. I gather that cuda_runtime.h is something that's typically > included by the driver by nvidia and not the client? C

Re: [PATCH] D13913: Allow linking multiple bitcode files.

2015-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 38046. tra added a comment. Added a comment about format of LinkModules vector. Added/cleaned up few comments in test files. http://reviews.llvm.org/D13913 Files: include/clang/Basic/LangOptions.def include/clang/CodeGen/CodeGenAction.h include/clang/Driv

Re: [PATCH] D13913: Allow linking multiple bitcode files.

2015-10-21 Thread Artem Belevich via cfe-commits
tra marked an inline comment as done. tra added a comment. http://reviews.llvm.org/D13913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D14000: [CUDA] Allow code generation for functions with target attributes that don't match compilation mode.

2015-10-22 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: eliben, jingyue, jpienaar, echristo. tra added a subscriber: cfe-commits. Currently -fcuda-disable-target-call-checks option enables parsing of code that calls across host/device boundary. However, we don't emit any IR for functions that don't have

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-10-23 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 38269. tra added a comment. Instead of passing AuxTriple around as an argument, store ToolChain info in Compilation and retrieve it from there. http://reviews.llvm.org/D13144 Files: include/clang/Driver/Compilation.h include/clang/Driver/Driver.h lib/Dri

r251427 - Allow linking multiple bitcode files.

2015-10-27 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Oct 27 12:56:59 2015 New Revision: 251427 URL: http://llvm.org/viewvc/llvm-project?rev=251427&view=rev Log: Allow linking multiple bitcode files. Linking options for particular file depend on the option that specifies the file. Currently there are two: * -mlink-bitcode-fil

Re: [PATCH] D13913: Allow linking multiple bitcode files.

2015-10-27 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251427: Allow linking multiple bitcode files. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D13913?vs=38046&id=38562#toc Repository: rL LLVM http://reviews.llvm.org/D13913 Fil

Re: [PATCH] D13171: [CUDA] Added a wrapper header for inclusion of stock CUDA headers.

2015-10-27 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 38574. tra added a comment. Added test cases for force-including of cuda_runtime.h Tweaked inclusion of one header due to use of default arguments. http://reviews.llvm.org/D13171 Files: lib/Driver/ToolChains.cpp lib/Headers/CMakeLists.txt lib/Headers/cuda

Re: [PATCH] D13170: [CUDA] Driver changes to pass flags needed to use detected CUDA installation.

2015-10-27 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 38576. tra added a comment. Updated to reflect latest changes in http://reviews.llvm.org/D13913. http://reviews.llvm.org/D13170 Files: include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-10-28 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/Driver.cpp:503 @@ -502,3 +502,3 @@ if (TC.getTriple().isOSBinFormatMachO()) -BuildUniversalActions(C->getDefaultToolChain(), C->getArgs(), Inputs, +BuildUniversalActions(*C, C->getDefaultToolChain(), C->getArgs(), Inputs

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-10-28 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 38694. tra added a comment. Folded some arguments of BuildUniversalActions. http://reviews.llvm.org/D13144 Files: include/clang/Driver/Compilation.h include/clang/Driver/Driver.h lib/Driver/Compilation.cpp lib/Driver/Driver.cpp lib/Driver/Tools.cpp

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-11-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 39017. tra added a comment. Moved CUDA toolchain selection to Compilation. Removed DeviceTriple info from CudaHostActions and CudaDeviceActions. Removed few now-unnecessary parameters and code that used them. http://reviews.llvm.org/D13144 Files: include/clan

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-11-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 39019. tra added a comment. Moved CUDA toolchain selection to Driver::BuildCompilation() where Compilation is set up. http://reviews.llvm.org/D13144 Files: include/clang/Driver/Action.h include/clang/Driver/Compilation.h include/clang/Driver/Driver.h l

Re: [PATCH] D13144: [CUDA] propagate to CUDA sub-compilations target triple of opposite side.

2015-11-02 Thread Artem Belevich via cfe-commits
tra marked an inline comment as done. tra added a comment. http://reviews.llvm.org/D13144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D14556: [CUDA] Detect and link with CUDA's libdevice bitcode library.

2015-11-10 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: echristo. tra added a subscriber: cfe-commits. This is libdevice-related part extracted from D13170 - added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for. - pass additional cc1 options

Re: [PATCH] D13170: [CUDA] Driver changes to pass flags needed to use detected CUDA installation.

2015-11-10 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 39860. tra added a comment. Moved libdevice detection and linking into a separate patch http://reviews.llvm.org/D14556. http://reviews.llvm.org/D13170 Files: include/clang/Driver/Options.td include/clang/Driver/To

Re: [PATCH] D11666: [CUDA] Make sure we emit all templated __global__ functions on device side.

2015-08-06 Thread Artem Belevich via cfe-commits
tra added a comment. Ping. http://reviews.llvm.org/D11666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22490: Append clang system include path for offloading tool chains.

2016-07-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/D22490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

Re: [PATCH] D22518: Refactor how include paths are appended to the command arguments.

2016-07-19 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D22518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

Re: [PATCH] D22518: Refactor how include paths are appended to the command arguments.

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

Re: [PATCH] D22518: Refactor how include paths are appended to the command arguments.

2016-07-28 Thread Artem Belevich via cfe-commits
tra added a comment. Samuel, the patch breaks CUDA. With the patch clang no longer adds include paths to standard c++ library during device-side compilation. if you run "clang++ -### -c -x cuda /dev/null" you will see that host side gets `"-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/4.8/.

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

2016-08-01 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. This makes clang's libdevice selection match that of NVCC as described in http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection If required libdevice variant is not found,

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

2016-08-01 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains.cpp:4773 @@ +4772,3 @@ + StringRef GpuArch = + DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20"); + std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch); jlebar wrote: >

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

2016-08-01 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 66392. tra added a comment. Added tests for libdevice mapping correctness. https://reviews.llvm.org/D23037 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains.cpp test/Driver/Inputs/CUDA_80/usr/local/cuda/nvvm/libdevice/libdevice.co

[PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-01 Thread Artem Belevich via cfe-commits
tra created this revision. tra added a reviewer: jlebar. tra added a subscriber: cfe-commits. It does not make sense and violates enough assumptions in the code to crash compiler. https://reviews.llvm.org/D23042 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains.cpp

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-01 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains.cpp:4834 @@ -4831,2 +4833,3 @@ +getDriver().Diag(diag::err_drv_cuda_nvptx_host); } return DAL; jlebar wrote: > IRL we talked about putting an assert() here and bailing out earlier. Does > tha

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 66505. tra added a comment. Herald added a subscriber: klimek. Abort pipeline constructions early if we detect that NVPTX is used for host compilation. Restore assertions for presence of -march flag. https://reviews.llvm.org/D23042 Files: include/clang/Basic

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Artem Belevich via cfe-commits
tra added a comment. In https://reviews.llvm.org/D23042#503869, @jlebar wrote: > > Restore assertions for presence of -march flag. > > > We don't need an explicit assertion in TranslateArgs? Nope. The action we create for fatbin uses CudaToolChain, but has nullptr BoundArch and there's no way

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 66560. tra added a comment. Added a comment describing why we delibrartly error out on use of NVPTX for host compilation. https://reviews.llvm.org/D23042 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Dri

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

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

r277537 - [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Aug 2 17:37:47 2016 New Revision: 277537 URL: http://llvm.org/viewvc/llvm-project?rev=277537&view=rev Log: [CUDA] Do not allow using NVPTX target for host compilation. Differential Revision: https://reviews.llvm.org/D23042 Modified: cfe/trunk/include/clang/Basic/Diagno

Re: [PATCH] D23042: [CUDA] Do not allow using NVPTX target for host compilation.

2016-08-02 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277537: [CUDA] Do not allow using NVPTX target for host compilation. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D23042?vs=66560&id=66578#toc Repository: rL LLVM https://rev

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

2016-08-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 66579. tra added a comment. Now that https://reviews.llvm.org/D23042 / r277537 makes sure that CudaToolchain is only used on device side, we can remove defaults for -march and restore asserts() ensuring that -march is added by the driver. https://reviews.llvm

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

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

r277542 - [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Aug 2 18:12:51 2016 New Revision: 277542 URL: http://llvm.org/viewvc/llvm-project?rev=277542&view=rev Log: [CUDA] Fix libdevice selection. This makes clang's libdevice selection match that of NVCC as described in http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage

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&id=66589#toc Repository: rL LLVM https://reviews.llvm.org/D23037 Files:

Re: r277542 - [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
> On Tue, Aug 2, 2016 at 4:12 PM, Artem Belevich via cfe-commits > wrote: > > Author: tra > > Date: Tue Aug 2 18:12:51 2016 > > New Revision: 277542 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=277542&view=rev > > Log: > > [CUDA] Fix libde

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&view=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: cfe/trunk/te

Re: r277542 - [CUDA] Fix libdevice selection.

2016-08-02 Thread Artem Belevich via cfe-commits
;> 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 >> wrote: >> > Author: tr

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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] 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

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

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] 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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 b

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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 "

[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] 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 http://lists.llvm.org/cgi-bi

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] 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 = +ca

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: https://reviews.llvm.org/D23429?vs=67851&id=6

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

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

2016-02-01 Thread Artem Belevich via cfe-commits
Richard, On Fri, Jan 15, 2016 at 5:32 PM, Richard Smith wrote: > On Fri, Jan 15, 2016 at 5:29 PM, Richard Smith > wrote: > > On Fri, Jan 15, 2016 at 4:22 PM, Artem Belevich wrote: > >> tra added inline comments. > >> > >> > >> Comment at: lib/CodeGen/CodeGenModule.cpp:2334 > >

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

2016-02-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 46696. tra marked 8 inline comments as done. tra added a comment. Addressed Richard's comments. Relaxed restrictions a bit to allow constant initializers even those CUDA would not considered to be empty. Updated test case accordingly. http://reviews.llvm.org/D1

r259592 - [CUDA] Do not allow dynamic initialization of global device side variables.

2016-02-02 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Feb 2 16:29:48 2016 New Revision: 259592 URL: http://llvm.org/viewvc/llvm-project?rev=259592&view=rev Log: [CUDA] Do not allow dynamic initialization of global device side variables. In general CUDA does not allow dynamic initialization of global device-side variables. One

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

2016-02-02 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259592: [CUDA] Do not allow dynamic initialization of global device side variables. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D15305?vs=46696&id=46707#toc Repository: rL LLV

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

2016-02-02 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:429-430 @@ +428,4 @@ + CXXConstructorDecl *CD) { + if (!CD->isDefined() && CD->isTemplateInstantiation()) +InstantiateFunctionDefinition(VarLoc, CD->getFirstDecl()); + --

Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-02-02 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 46729. tra added a comment. Added few more device-side system calls and related wrapper functions. Added nothrow attributes on malloc/free. http://reviews.llvm.org/D16638 Files: lib/Headers/__clang_cuda_runtime_wrapper.h Index: lib/Headers/__clang_cuda_runti

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Artem Belevich via cfe-commits
tra retitled this revision from "[CUDA] Added device-side std::{malloc/free}" to "[CUDA] Added device-side system call decls and related wrappers.". tra updated the summary for this revision. tra updated this revision to Diff 46803. tra marked 3 inline comments as done. tra added a comment. Addre

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:232 @@ +231,3 @@ +// Clang will convert printf into vprintf, but we still need +// device-side declaration for it. +__device__ int printf(const char *, ...); jlebar wrote: > I'd pref

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 46818. tra added a comment. Updated comment. http://reviews.llvm.org/D16638 Files: lib/Headers/__clang_cuda_runtime_wrapper.h Index: lib/Headers/__clang_cuda_runtime_wrapper.h === --- lib/Header

r259690 - [CUDA] added declarations for device-side system calls

2016-02-03 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Feb 3 14:53:58 2016 New Revision: 259690 URL: http://llvm.org/viewvc/llvm-project?rev=259690&view=rev Log: [CUDA] added declarations for device-side system calls ...and std:: wrappers for free/malloc. Modified: cfe/trunk/lib/Headers/__clang_cuda_runtime_wrapper.h Modi

Re: [PATCH] D16638: [CUDA] Added device-side system call decls and related wrappers.

2016-02-03 Thread Artem Belevich via cfe-commits
tra closed this revision. tra added a comment. Committed in r259690 http://reviews.llvm.org/D16638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-03 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, jingyue, jpienaar, eliben. tra added a subscriber: cfe-commits. This is an artefact of split-mode CUDA compilation that we need to mimic. HD functions are sometimes allowed to call H or D functions. Due to split compilation mode device-side c

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-03 Thread Artem Belevich via cfe-commits
tra added a comment. When overload set contains h and HD functions that are otherwise equal for overload resolution, you want to be able to tell which one is better. http://reviews.llvm.org/D16870 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-04 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 46927. tra marked an inline comment as done. tra added a comment. Addressed Jingyue's comments. Fixed function-overload.cu tests to reflect stricter call target checks. http://reviews.llvm.org/D16870 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-04 Thread Artem Belevich via cfe-commits
tra marked an inline comment as done. Comment at: lib/Sema/SemaCUDA.cpp:132-141 @@ -131,12 +131,12 @@ // (d) HostDevice behavior depends on compilation mode. if (CallerTarget == CFT_HostDevice) { // Calling a function that matches compilation mode is OK. // Calling

[PATCH] D16932: [CUDA] Bug 26497 : Remove wrappers for variants already provided by CUDA headers.

2016-02-05 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jingyue, jlebar. tra added a subscriber: cfe-commits. ... and pull them into std namespace with using-declaration instead. http://reviews.llvm.org/D16932 Files: lib/Headers/__clang_cuda_cmath.h Index: lib/Headers/__clang_cuda_cmath.h ==

Re: [PATCH] D16932: [CUDA] Bug 26497 : Remove wrappers for variants already provided by CUDA headers.

2016-02-05 Thread Artem Belevich via cfe-commits
tra added a comment. I'm not sure what we could test here without CUDA headers. I've tested out-of-tree by compiling thrust unit tests and the test case in PR. http://reviews.llvm.org/D16932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

Re: [PATCH] D16932: [CUDA] Bug 26497 : Remove wrappers for variants already provided by CUDA headers.

2016-02-05 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259944: [CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D16932?vs=47040&id=47058#toc Repository: rL LLVM

r259944 - [CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers.

2016-02-05 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Feb 5 16:54:05 2016 New Revision: 259944 URL: http://llvm.org/viewvc/llvm-project?rev=259944&view=rev Log: [CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers. ... and pull global-scope ones into std namespace with using-declaration. Differential Revis

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-09 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 47335. tra marked 3 inline comments as done. tra added a comment. Updated the way WrongSide functions are removed from consideration during overload resolution. Previous version could provide inconsistent results dependi

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-09 Thread Artem Belevich via cfe-commits
tra planned changes to this revision. tra added a comment. Previously accepted version was dependent on order of functions in overload set. In order to make ordering consistent, WrongSide functions are now removed from the set before pair-wise comparison of candidates. Please take a look.

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-09 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1880 @@ +1879,3 @@ +// Conservatively, mark all functions in CUDA as convergent (meaning, they +// may call an intrinsicly convergent op, such as __syncthreads(), and so +// can't have certain optimiz

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Artem Belevich via cfe-commits
tra added a comment. Erasing an argument would only complicate the problem. I guess for consistency we need to match clang's behavior for regular C++ code. For optimized builds it just seems to pass NULL pointer instead. http://reviews.llvm.org/D17103 _

[PATCH] D17111: [CUDA] pass debug options to ptxas.

2016-02-10 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, echristo. tra added a subscriber: cfe-commits. ptxas optimizations are disabled if we need to generate debug info as ptxas does not accept '-g' otherwise. http://reviews.llvm.org/D17111 Files: lib/Driver/Tools.cpp test/Driver/cuda-exter

Re: [PATCH] D17111: [CUDA] pass debug options to ptxas.

2016-02-10 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/Tools.cpp:10707 @@ +10706,3 @@ +// ptxas does not accept -g option if optimization is enabled, so we ignore +// compiler's -O* options if we want debug info. +CmdArgs.push_back("-g"); hfinkel wrote: > e

Re: [PATCH] D17111: [CUDA] pass debug options to ptxas.

2016-02-10 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/Tools.cpp:10707 @@ +10706,3 @@ +// ptxas does not accept -g option if optimization is enabled, so we ignore +// compiler's -O* options if we want debug info. +CmdArgs.push_back("-g"); tra wrote: > hfink

Re: [PATCH] D17111: [CUDA] pass debug options to ptxas.

2016-02-10 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Driver/Tools.cpp:10707 @@ +10706,3 @@ +// ptxas does not accept -g option if optimization is enabled, so we ignore +// compiler's -O* options if we want debug info. +CmdArgs.push_back("-g"); hfinkel wrote: > e

Re: [PATCH] D17111: [CUDA] Added --cuda-noopt-device-debug option to control ptxas' debug info generation.

2016-02-11 Thread Artem Belevich via cfe-commits
tra retitled this revision from "[CUDA] pass debug options to ptxas." to "[CUDA] Added --cuda-noopt-device-debug option to control ptxas' debug info generation.". tra updated the summary for this revision. tra updated this revision to Diff 47680. tra added a comment. Added --cuda-noopt-device-de

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-11 Thread Artem Belevich via cfe-commits
tra requested a review of this revision. tra added a comment. This revision is now accepted and ready to land. @jingyue, @jlebar: can you take a look at the updated version? http://reviews.llvm.org/D16870 ___ cfe-commits mailing list cfe-commits@lis

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-11 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 47753. tra marked 14 inline comments as done. tra added a comment. Addressed @jlebar's comments. http://reviews.llvm.org/D16870 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaOverload.cpp test/CodeGenCUDA/function-overload.cu test

r260697 - [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-12 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Feb 12 12:29:18 2016 New Revision: 260697 URL: http://llvm.org/viewvc/llvm-project?rev=260697&view=rev Log: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior. This is an artefact of split-mode CUDA compilation that we need to mimic. HD functions are som

Re: [PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

2016-02-12 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260697: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D16870?vs=47753&id=47819#toc Repository: rL LLVM

r260719 - Added missing '__'.

2016-02-12 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Feb 12 14:26:43 2016 New Revision: 260719 URL: http://llvm.org/viewvc/llvm-project?rev=260719&view=rev Log: Added missing '__'. Modified: cfe/trunk/lib/Headers/__clang_cuda_cmath.h Modified: cfe/trunk/lib/Headers/__clang_cuda_cmath.h URL: http://llvm.org/viewvc/llvm-pr

Re: r260719 - Added missing '__'.

2016-02-12 Thread Artem Belevich via cfe-commits
i, Feb 12, 2016, 12:31 PM Artem Belevich via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: tra >> Date: Fri Feb 12 14:26:43 2016 >> New Revision: 260719 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=260719&view=rev >>

<    1   2   3   4   5   6   7   8   9   10   >