[llvm-branch-commits] [cfe-branch] r277004 - Merging r276979:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 28 10:11:03 PDT 2016
Author: hans
Date: Thu Jul 28 12:11:02 2016
New Revision: 277004
URL: http://llvm.org/viewvc/llvm-project?rev=277004&view=rev
Log:
Merging r276979:
------------------------------------------------------------------------
r276979 | sfantao | 2016-07-28 07:29:18 -0700 (Thu, 28 Jul 2016) | 12 lines
[OpenMP][CUDA] Do not forward OpenMP flags for CUDA device actions.
Summary:
This patch prevents OpenMP flags from being forwarded to CUDA device commands. That was causing the CUDA frontend to attempt to emit OpenMP code which is not supported.
This fixes the bug reported in https://llvm.org/bugs/show_bug.cgi?id=28723.
Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, tra, ABataev
Subscribers: caomhin, cfe-commits
Differential Revision: https://reviews.llvm.org/D22895
------------------------------------------------------------------------
Added:
cfe/branches/release_39/test/Driver/offloading-interoperability.c
- copied unchanged from r276979, cfe/trunk/test/Driver/offloading-interoperability.c
Modified:
cfe/branches/release_39/ (props changed)
cfe/branches/release_39/lib/Driver/Tools.cpp
Propchange: cfe/branches/release_39/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 28 12:11:02 2016
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276716,276887,276891
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276716,276887,276891,276979
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_39/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Driver/Tools.cpp?rev=277004&r1=277003&r2=277004&view=diff
==============================================================================
--- cfe/branches/release_39/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_39/lib/Driver/Tools.cpp Thu Jul 28 12:11:02 2016
@@ -5020,9 +5020,13 @@ void Clang::ConstructJob(Compilation &C,
Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_show_template_tree);
Args.AddLastArg(CmdArgs, options::OPT_fno_elide_type);
- // Forward flags for OpenMP
+ // Forward flags for OpenMP. We don't do this if the current action is an
+ // device offloading action.
+ //
+ // TODO: Allow OpenMP offload actions when they become available.
if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
- options::OPT_fno_openmp, false)) {
+ options::OPT_fno_openmp, false) &&
+ JA.isDeviceOffloading(Action::OFK_None)) {
switch (getOpenMPRuntime(getToolChain(), Args)) {
case OMPRT_OMP:
case OMPRT_IOMP5:
More information about the llvm-branch-commits
mailing list