[OpenMP] Add flag for specifying the target device architecture for OpenMP device...
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>
Mon, 7 Aug 2017 15:39:11 +0000 (15:39 +0000)
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>
Mon, 7 Aug 2017 15:39:11 +0000 (15:39 +0000)
commit47e0cf378c793b00207998a0537c2fd75bd1ec74
tree3f667d95b0f1bf3a9a5009c9c8a568374d48cfb2
parent02d9945e6f11959887e2eefbbb5a635ff5087dbe
[OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

Summary:
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 underlying NVIDIA architecture for the OpenMP offloading CUDA tool chain.

Only a host-offloading test is provided since full device offloading capability will only be available when [[ https://reviews.llvm.org/D29654 | D29654 ]] lands.

Reviewers: hfinkel, Hahnfeld, carlo.bertolli, caomhin, ABataev

Reviewed By: hfinkel

Subscribers: guansong, cfe-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D34784

llvm-svn: 310263
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/Compilation.cpp
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/test/Driver/openmp-offload.c