
This patch enables the `-fopenmp-force-usm` option to be passed to the flang driver, which forwards it to the compiler frontend. This flag, when set, results in the introduction of the `unified_shared_memory` bit to the `omp.requires` attribute of the top-level module operation. This is later combined with any other target device-related REQUIRES clauses that may have been explicitly set in the compilation unit.
13 lines
606 B
Fortran
13 lines
606 B
Fortran
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-force-usm %s -o - | FileCheck %s
|
|
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-target-device -fopenmp-force-usm %s -o - | FileCheck %s
|
|
! RUN: bbc -fopenmp -fopenmp-force-usm -emit-hlfir %s -o - | FileCheck %s
|
|
! RUN: bbc -fopenmp -fopenmp-is-target-device -fopenmp-force-usm -emit-hlfir %s -o - | FileCheck %s
|
|
|
|
! This test checks the addition of requires unified_shared_memory when
|
|
! -fopenmp-force-usm is set
|
|
|
|
!CHECK: module attributes {
|
|
!CHECK-SAME: omp.requires = #omp<clause_requires unified_shared_memory>
|
|
program requires
|
|
end program requires
|