[PATCH] D29358: [OpenMP] Report an error for -faltivec on anything other than PowerPC.

2017-01-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Herald added a subscriber: nemanjai. When performing an offload, throw an error if the host tool chain uses the altivec flag on an architecture other than PowerPC. Repository: rL LLVM https://reviews.llvm.org/D29358 Files: lib/Driver/Tools.cpp

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-02-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 86635. gtbercea added a comment. Condition changed to only check triple once. Repository: rL LLVM https://reviews.llvm.org/D29339 Files: lib/Driver/Tools.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-01-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Device offloading requires the specification of an additional flag containing the triple of the //other// architecture the code is being compiled on if such an architecture exists. If compiling for the host, the auxiliary triple flag will contain the triple

[PATCH] D29659: [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

2017-02-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Previously we have added the "-c" flag which gets passed to PTXAS by default to generate relocatable OpenMP target code by default. This set of flags exposes control over this behaviour. Repository: rL LLVM https://reviews.llvm.org/D29659 Files:

[PATCH] D29659: [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

2017-02-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 87463. gtbercea added a comment. Additional test added to check "-c" is passed in appropriately. Repository: rL LLVM https://reviews.llvm.org/D29659 Files: include/clang/Driver/Options.td lib/Driver/Tools.cpp test/Driver/openmp-offload.c Index:

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-02-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. This flag "--fopenmp-ptx=" enables the overwriting of the default PTX version used for GPU offloaded OpenMP target regions: "+ptx42". Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains.cpp

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-02-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-02-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. When a scalar argument is explicitly mapped, the device kernel needs to be passed that argument by reference. This is a partial fix to this bug . The full fix requires data sharing support which will land in future

[PATCH] D29659: [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

2017-03-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93240. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29659 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-03-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93244. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93171. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29339 Files: lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93513. gtbercea added a comment. Herald added a subscriber: rengolin. Clean-up test. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp Index:

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93502. gtbercea added a comment. Remove redundant check. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93501. gtbercea added a comment. Remove redundant check. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93559. gtbercea added a comment. Change prefix name in test. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2167-2172 +// Set the flag to prevent the implementation from emitting device exception +// handling code for those requiring so. +if (Opts.OpenMPIsDevice && T.isNVPTX()) { +

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93557. gtbercea added a comment. Change prefix name in test. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93181. gtbercea marked 5 inline comments as done. gtbercea added a comment. Herald added subscribers: sbc100, dschuff, jfb, rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29647 Files:

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains.cpp:4902 + DeviceOffloadingKind == Action::OFK_Cuda) && + "The offloading kind is not OpenMP or CUDA."); jlebar wrote: > Not sure this assertion message helps us much beyond

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93172. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/Tools.cpp:12136 // Obtain architecture from the action. - CudaArch gpu_arch = StringToCudaArch(JA.getOffloadingArch()); assert(gpu_arch != CudaArch::UNKNOWN && jlebar wrote: > Why does

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93176. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93192. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29654 Files: lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D29651: [OpenMP] Consider LIBRARY_PATH when selecting library paths for NVPTX targets in OpenMP mode.

2017-03-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93188. gtbercea added a comment. Herald added a subscriber: rengolin. Update patch to reflect latest source code changes. Repository: rL LLVM https://reviews.llvm.org/D29651 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93643. gtbercea added a comment. Re-order conditions and run clang-format. Repository: rL LLVM https://reviews.llvm.org/D29339 Files: lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93676. gtbercea added a comment. Move test. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/cuda-external-tools.cu Index: test/Driver/cuda-external-tools.cu

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93672. gtbercea marked an inline comment as done. gtbercea added a comment. Fix prefix. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93679. gtbercea added a comment. Herald added a subscriber: rengolin. Split patch. Repository: rL LLVM https://reviews.llvm.org/D29658 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/Driver.cpp test/OpenMP/target_messages.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:358-360 + /// Do the check specified in \a Check to all component lists at a given level + /// and return true if any issue is found. + bool

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94824. gtbercea added a comment. Integrate review. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94841. gtbercea added a comment. Refactor. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94842. gtbercea added a comment. Run clang format. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94867. gtbercea added a comment. Refactor code. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-03 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93859. gtbercea added a comment. Herald added a subscriber: rengolin. Update test. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29659: [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

2017-04-03 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93883. gtbercea added a comment. Update test. Repository: rL LLVM https://reviews.llvm.org/D29659 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-03 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93901. gtbercea added a comment. Update test. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94972. gtbercea added a comment. Pass correct levels. Refactor code. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94985. gtbercea added a comment. Refactor code. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94983. gtbercea added a comment. Clean-up. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94990. gtbercea added a comment. Fix for loop range. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-04-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94991. gtbercea added a comment. Update check before loop. Repository: rL LLVM https://reviews.llvm.org/D29905 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp

[PATCH] D32035: [OpenMP] Error when trying to offload to an unsupported architecture

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Herald added a subscriber: rengolin. Throw an error when offloading is unsupported for a particular target architecture. Repository: rL LLVM https://reviews.llvm.org/D32035 Files: include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95175. gtbercea added a comment. Use the rename() utility function of LLVM for renaming the PTXAS output before invoking NVLINK. Repository: rL LLVM https://reviews.llvm.org/D29654 Files: lib/Driver/Driver.cpp lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked 4 inline comments as done. gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:594 +/// Check cubin file generation and usage by nvlink +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps

[PATCH] D32035: [OpenMP] Error when trying to offload to an unsupported architecture

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95198. gtbercea added a comment. Re-use an already existing flag rather than creating a new one. Repository: rL LLVM https://reviews.llvm.org/D32035 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_messages.cpp Index:

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-04-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95737. gtbercea marked an inline comment as done. gtbercea added a comment. Avoid renaming by enabling PTXAS to generate an output file with the appropriate extension, in this case a cubin extension. Repository: rL LLVM https://reviews.llvm.org/D29654

[PATCH] D29659: [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

2017-04-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 96144. gtbercea added a comment. Refactor if condition. Repository: rL LLVM https://reviews.llvm.org/D29659 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95171. gtbercea added a comment. Remove tests which belong into a different patch. Repository: rL LLVM https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95126. gtbercea added a comment. Fix. Repository: rL LLVM https://reviews.llvm.org/D29660 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D32035: [OpenMP] Error when trying to offload to an unsupported architecture

2017-04-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95461. gtbercea added a comment. Merge IF statements. Repository: rL LLVM https://reviews.llvm.org/D32035 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_messages.cpp Index: test/OpenMP/target_messages.cpp

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-04-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 94475. gtbercea added a comment. Address some of the reviews. Repository: rL LLVM https://reviews.llvm.org/D29654 Files: lib/Driver/Driver.cpp lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/CommonArgs.h

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93665. gtbercea added a comment. Redo regression test. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp Index:

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked 2 inline comments as done. gtbercea added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2167-2172 +// Set the flag to prevent the implementation from emitting device exception +// handling code for those requiring so. +if

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93670. gtbercea added a comment. run clang-format on test. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp Index:

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. I have re-enabled the previous offloading tests and moved the new GPU offloading tests to a new file which is disabled for linux (for now). 310718 Alex thanks so much for the logs, they have been very useful to understand what's going on. Aleksey, I have since tried

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. First of all, I apologize if I've upset you with my previous post. I am actively working on understanding what is causing these issues. It is not my intention to write tests that work on local configurations only. I am upset to see that these tests keep failing for

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#836927, @arphaman wrote: > Looks like this test is failing on macOS again after this change: > > http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/39231/testReport/Clang/Driver/openmp_offload_c/ > > Can you

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Revision 310505 fixes the tests for this patch. Repository: rL LLVM https://reviews.llvm.org/D29660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36537: [OpenMP] Enable executable lookup into driver directory.

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Invoking the compiler inside a script causes the clang-offload-bundler executable to not be found. This patch fixes this error. Repository: rL LLVM https://reviews.llvm.org/D36537 Files: lib/Driver/ToolChains/Cuda.cpp Index:

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. 310549 should solve this problem by using a default architecture that is supported by the current device version. Repository: rL LLVM https://reviews.llvm.org/D29660 ___ cfe-commits mailing list

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#838194, @arphaman wrote: > The failures were very widespread, e.g. there's a linux buildbot that was red > until the revert: http://bb.pgr.jp/builders/test-clang-i686-linux-RA. If you > have access to a linux machine you should be

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839275, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#839209, @gtbercea wrote: > > > I have re-enabled the previous offloading tests and moved the new GPU > > offloading tests to a new file which is disabled for linux (for

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839550, @alekseyshl wrote: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7109 > failed on r310718, please fix. Couldn't fix/find the actual error so for now, just moving the flag patch tests to

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Hi Alex, I have no idea what the errors you mention are. I worked until very late last night to fix the previous error with the compute capability. Maybe fixing that unlocked some other errors. I would need a lot of help to figure out what's going on since I probably

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839736, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#839728, @alekseyshl wrote: > > > In https://reviews.llvm.org/D29660#839550, @alekseyshl wrote: > > > > >

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#838185, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#838150, @gtbercea wrote: > > > First of all, I apologize if I've upset you with my previous post. I am > > actively working on understanding what is causing these issues.

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105932. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index:

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @hfinkel I think I have something that works which is similar to what you were requesting. Please let me know your thoughts! Thanks, --Doru https://reviews.llvm.org/D34784 ___ cfe-commits mailing list

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:474 +for (StringRef Opt : OptList) { + AddMArchOption(DAL, Opts, Opt); +} hfinkel wrote: > gtbercea wrote: > > hfinkel wrote: > > > Shouldn't you be adding all of the

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29905#800416, @Hahnfeld wrote: > In https://reviews.llvm.org/D34888#799576, @gtbercea wrote: > > > Does this also include the fixes in the following revision? > > > > https://reviews.llvm.org/D29905 > > > Sorry, I wasn't aware of this

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:614 +/// Check -march propagates compute capability to device offloading toolchain. +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:614 +/// Check -march propagates compute capability to device offloading toolchain. +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795367, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795353, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795287, @hfinkel wrote: > > > > > What happens if you have multiple targets? Maybe this should be > > >

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795934, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795871, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795367, @hfinkel wrote: > > > > > In https://reviews.llvm.org/D34784#795353, @gtbercea wrote: > > > > > > >

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104527. gtbercea added a comment. Split previous diff into a "device offloading kind" patch (show here) and a **new** patch which relies on a new compiler flag. A TODO has been added to signal that the compute capability is to be handled in the **new**

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104532. Repository: rL LLVM https://reviews.llvm.org/D34784 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104535. gtbercea added a comment. [Update regression tests] Add a test for propagating the compute capability to the OpenMP device offloading toolchain which targets NVIDIA GPUs. This is a test for patch D34784 which is

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. OpenMP has the ability to offload target regions to devices which may have different architectures. A new -fopenmp-target-arch flag is introduced to specify the device architecture. In this patch I use the new flag to specify the compute capability of the

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104656. gtbercea added a comment. Rebase https://reviews.llvm.org/D29339 Files: lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp lib/Frontend/InitPreprocessor.cpp test/Driver/openmp-offload.c

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795287, @hfinkel wrote: > What happens if you have multiple targets? Maybe this should be > -fopenmp-targets-arch=foo,bar,whatever? > > Once this all lands, please make sure that you add additional test cases > here. Make sure that

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104962. gtbercea added a comment. Check -fopenmp-targets has one entry when using default toolchain in -Xopenmp-target. https://reviews.llvm.org/D34784 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @hfinkel I've add the flag as suggested. There is one minor change, I used "=" instead of ":" when specifying the toolchain/triple. I also support the triple being omitted when there is only one offloading toolchain specified with -fopenmp-targets.

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104960. gtbercea retitled this revision from "[OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading " to "[OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading". gtbercea added a

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795988, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795980, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795934, @hfinkel wrote: > > > > > In https://reviews.llvm.org/D34784#795871, @gtbercea wrote: > > > > > > >

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105446. gtbercea added a comment. Use str() https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105453. gtbercea added a comment. . https://reviews.llvm.org/D29647 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains/BareMetal.cpp lib/Driver/ToolChains/BareMetal.h lib/Driver/ToolChains/Clang.cpp

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105280. gtbercea marked 3 inline comments as done. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:443 + +// Get the compute capability from the -fopenmp-targets flag. +// The default compute capability is sm_20 since this is a CUDA hfinkel wrote: > Is this first sentence

[PATCH] D34888: [OpenMP] Fix mapping of scalars for combined directives

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Does this also include the fixes in the following revision? https://reviews.llvm.org/D29905 Repository: rL LLVM https://reviews.llvm.org/D34888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:607 + +// CHK-FOPENMP-EQ-TARGET: clang{{.*}} argument unused during compilation: '-Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr8' + hfinkel wrote: > I don't see why you'd check that

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105355. gtbercea added a comment. Address Comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index:

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:478 +auto MArchList = DAL->getAllArgValues(options::OPT_march_EQ); +assert(MArchList.size() < 2 && "At most one GPU arch allowed."); +if (MArchList.empty()) hfinkel wrote: >

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105354. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:435 + +// TODO: get the compute capability from offloading arguments when not +// using the default compute capability of sm_20. hfinkel wrote: > gtbercea wrote: > > hfinkel

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:435 + +// TODO: get the compute capability from offloading arguments when not +// using the default compute capability of sm_20. hfinkel

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:435 + +// TODO: get the compute capability from offloading arguments when not +// using the default compute capability of sm_20. hfinkel

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:217 + std::vector GPUArchNames; + // If this is an OpenMP action we need to extract the device architecture from + // the -march option.

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104427. gtbercea added a comment. Herald added subscribers: aheejin, jgravelle-google. Updated diff to address comments. Repository: rL LLVM https://reviews.llvm.org/D29647 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp

[PATCH] D29651: [OpenMP] Consider LIBRARY_PATH when selecting library paths for NVPTX targets in OpenMP mode.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea abandoned this revision. gtbercea added a comment. Not needed. These changes are related to looking up the .bc library for inlining purposes. I believe @arpith-jacob has already handled this in trunk. Therefore this is obsolete code. Repository: rL LLVM

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105320. gtbercea edited the summary of this revision. gtbercea added a comment. Rebase on latest master. https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

  1   2   3   4   5   6   >