diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 17:39:44 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 17:39:44 +0000 |
commit | 31fef989934d38385567f9df8016e0d567a62bd0 (patch) | |
tree | cb0c20475700c8b276cfe0fb6a9b70e9e66a3cf2 /clang/lib/Driver/Driver.cpp | |
parent | 59efaede56bebf15853f06faa9a799b6963b43de (diff) | |
download | bcm5719-llvm-31fef989934d38385567f9df8016e0d567a62bd0.tar.gz bcm5719-llvm-31fef989934d38385567f9df8016e0d567a62bd0.zip |
[Driver][OpenMP] Add logic for offloading-specific argument translation.
Summary:
This patch includes support for argument translation that is specific of a given offloading kind. Additionally, it implements the translation for OpenMP device kinds in the gcc tool chain.
With this patch, it is possible to compile a functional OpenMP application with offloading capabilities with no separate compilation.
Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel
Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin
Differential Revision: https://reviews.llvm.org/D21848
llvm-svn: 285320
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 58c25cfce45..fe9605279f3 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -3011,7 +3011,8 @@ InputInfo Driver::BuildJobsForActionNoCache( // Set the effective triple of the toolchain for the duration of this job. llvm::Triple EffectiveTriple; const ToolChain &ToolTC = T->getToolChain(); - const ArgList &Args = C.getArgsForToolChain(TC, BoundArch); + const ArgList &Args = + C.getArgsForToolChain(TC, BoundArch, A->getOffloadingDeviceKind()); if (InputInfos.size() != 1) { EffectiveTriple = llvm::Triple(ToolTC.ComputeEffectiveClangTriple(Args)); } else { @@ -3041,8 +3042,10 @@ InputInfo Driver::BuildJobsForActionNoCache( } llvm::errs() << "], output: " << Result.getAsString() << "\n"; } else { - T->ConstructJob(C, *JA, Result, InputInfos, - C.getArgsForToolChain(TC, BoundArch), LinkingOutput); + T->ConstructJob( + C, *JA, Result, InputInfos, + C.getArgsForToolChain(TC, BoundArch, JA->getOffloadingDeviceKind()), + LinkingOutput); } return Result; } |