forked from OSchip/llvm-project
[OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag
The changes in D130020 removed all support for the old method of compiling OpenMP offloading programs. This means that `-fopenmp-new-driver` has no effect and `-fno-openmp-new-driver` does not work. This patch removes the use and documentation of this flag. Note that the `--offload-new-driver` flag still exists for using the new driver optionally with CUDA and HIP. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D133367
This commit is contained in:
parent
f049b2c3fc
commit
57ef29f283
|
@ -2181,10 +2181,6 @@ Enable all Clang extensions for OpenMP directives and clauses
|
|||
|
||||
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.
|
||||
|
|
|
@ -3902,9 +3902,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
|
|||
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);
|
||||
|
||||
|
|
|
@ -4459,9 +4459,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
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 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
|
||||
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()) {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue