[PATCH] D133367: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 11:40:29 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG57ef29f2835e: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133367/new/
https://reviews.llvm.org/D133367
Files:
clang/docs/ClangCommandLineReference.rst
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/amdgpu-openmp-toolchain.c
Index: clang/test/Driver/amdgpu-openmp-toolchain.c
===================================================================
--- clang/test/Driver/amdgpu-openmp-toolchain.c
+++ clang/test/Driver/amdgpu-openmp-toolchain.c
@@ -49,5 +49,5 @@
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-EMIT-LLVM-IR
// CHECK-EMIT-LLVM-IR: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-emit-llvm"
-// RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -lm --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode -fopenmp-new-driver %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIB-DEVICE-NEW
+// RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -lm --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIB-DEVICE-NEW
// CHECK-LIB-DEVICE-NEW: {{.*}}clang-linker-wrapper{{.*}}--bitcode-library=openmp-amdgcn-amd-amdhsa-gfx803={{.*}}ocml.bc"{{.*}}ockl.bc"{{.*}}oclc_daz_opt_on.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_correctly_rounded_sqrt_on.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -4459,9 +4459,7 @@
bool IsDeviceOffloadAction = !(JA.isDeviceOffloading(Action::OFK_None) ||
JA.isDeviceOffloading(Action::OFK_Host));
bool IsHostOffloadingAction =
- (JA.isHostOffloading(Action::OFK_OpenMP) &&
- Args.hasFlag(options::OPT_fopenmp_new_driver,
- options::OPT_no_offload_new_driver, true)) ||
+ JA.isHostOffloading(Action::OFK_OpenMP) ||
(JA.isHostOffloading(C.getActiveOffloadKinds()) &&
Args.hasFlag(options::OPT_offload_new_driver,
options::OPT_no_offload_new_driver, false));
@@ -4762,9 +4760,7 @@
if (IsUsingLTO) {
// Only AMDGPU supports device-side LTO.
- if (IsDeviceOffloadAction &&
- !Args.hasFlag(options::OPT_fopenmp_new_driver,
- options::OPT_no_offload_new_driver, true) &&
+ if (IsDeviceOffloadAction && !JA.isHostOffloading(Action::OFK_OpenMP) &&
!Args.hasFlag(options::OPT_offload_new_driver,
options::OPT_no_offload_new_driver, false) &&
!Triple.isAMDGPU()) {
Index: clang/lib/Driver/Driver.cpp
===================================================================
--- clang/lib/Driver/Driver.cpp
+++ clang/lib/Driver/Driver.cpp
@@ -3902,9 +3902,7 @@
OffloadingActionBuilder OffloadBuilder(C, Args, Inputs);
bool UseNewOffloadingDriver =
- (C.isOffloadingHostKind(Action::OFK_OpenMP) &&
- Args.hasFlag(options::OPT_fopenmp_new_driver,
- options::OPT_no_offload_new_driver, true)) ||
+ C.isOffloadingHostKind(Action::OFK_OpenMP) ||
Args.hasFlag(options::OPT_offload_new_driver,
options::OPT_no_offload_new_driver, false);
Index: clang/docs/ClangCommandLineReference.rst
===================================================================
--- clang/docs/ClangCommandLineReference.rst
+++ clang/docs/ClangCommandLineReference.rst
@@ -2181,10 +2181,6 @@
Set rpath on OpenMP executables
-.. option:: -fopenmp-new-driver
-
-Use the new driver for OpenMP offloading.
-
.. option:: -fopenmp-offload-mandatory
Do not create a host fallback if offloading to the device fails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133367.458235.patch
Type: text/x-patch
Size: 3794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220906/a7ef452e/attachment.bin>
More information about the cfe-commits
mailing list