[flang-commits] [flang] c1b5674 - [OpenMP] Change OpenMP default version in documentation and help text for -fopenmp-version

via flang-commits flang-commits at lists.llvm.org
Mon Aug 28 19:14:59 PDT 2023


Author: Anton Rydahl
Date: 2023-08-28T19:05:55-07:00
New Revision: c1b5674fbb76c4b137a1e856441019605668f1ca

URL: https://github.com/llvm/llvm-project/commit/c1b5674fbb76c4b137a1e856441019605668f1ca
DIFF: https://github.com/llvm/llvm-project/commit/c1b5674fbb76c4b137a1e856441019605668f1ca.diff

LOG: [OpenMP] Change OpenMP default version in documentation and help text for -fopenmp-version

As discussed on the weekly OpenMP meeting on the second of August 2023, the default version
in the OpenMP documentation shoud be changed from OpenMP 5.0 to 5.1.

Differential Revision: https://reviews.llvm.org/D156901

Added: 
    

Modified: 
    clang/docs/OpenMPSupport.rst
    clang/include/clang/Driver/Options.td
    flang/test/Driver/driver-help-hidden.f90
    flang/test/Driver/driver-help.f90
    openmp/docs/CommandLineArgumentReference.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/OpenMPSupport.rst b/clang/docs/OpenMPSupport.rst
index be3894389a3517..641ec78a56da8e 100644
--- a/clang/docs/OpenMPSupport.rst
+++ b/clang/docs/OpenMPSupport.rst
@@ -26,7 +26,8 @@ PPC64[LE] and has `basic support for Cuda devices`_.
 In addition, the LLVM OpenMP runtime `libomp` supports the OpenMP Tools
 Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS.
 
-For the list of supported features from OpenMP 5.0 see `OpenMP implementation details`_.
+For the list of supported features from OpenMP 5.0 and 5.1
+see `OpenMP implementation details`_ and `OpenMP 51 implementation details`_.
 
 General improvements
 ====================
@@ -252,6 +253,8 @@ implementation.
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
 
 
+.. _OpenMP 51 implementation details:
+
 OpenMP 5.1 Implementation Details
 =================================
 

diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index da2dc934e37cfd..c367d515cbdcdc 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3200,7 +3200,7 @@ def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>,
 def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>,
   Flags<[NoArgumentUnused]>,
   Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
-  HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang">;
+  HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). Default value is 51 for Clang">;
 defm openmp_extensions: BoolFOption<"openmp-extensions",
   LangOpts<"OpenMPExtensions">, DefaultTrue,
   PosFlag<SetTrue, [NoArgumentUnused], [ClangOption, CC1Option],

diff  --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90
index 7f827026b9203d..888e580d4e845e 100644
--- a/flang/test/Driver/driver-help-hidden.f90
+++ b/flang/test/Driver/driver-help-hidden.f90
@@ -74,7 +74,7 @@
 ! CHECK-NEXT: -fopenmp-targets=<value>
 ! CHECK-NEXT:                         Specify comma-separated list of triples OpenMP offloading targets to be supported
 ! CHECK-NEXT: -fopenmp-version=<value>
-! CHECK-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang
+! CHECK-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). Default value is 51 for Clang
 ! CHECK-NEXT: -fopenmp                Parse OpenMP pragmas and generate parallel code.
 ! CHECK-NEXT: -foptimization-record-file=<file>
 ! CHECK-NEXT:                         Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.

diff  --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90
index b1da592ca0bd8a..c82f72dff164d7 100644
--- a/flang/test/Driver/driver-help.f90
+++ b/flang/test/Driver/driver-help.f90
@@ -62,7 +62,7 @@
 ! HELP-NEXT: -fopenmp-targets=<value>
 ! HELP-NEXT:                         Specify comma-separated list of triples OpenMP offloading targets to be supported
 ! HELP-NEXT: -fopenmp-version=<value>
-! HELP-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang
+! HELP-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). Default value is 51 for Clang
 ! HELP-NEXT: -fopenmp                Parse OpenMP pragmas and generate parallel code.
 ! HELP-NEXT: -foptimization-record-file=<file>
 ! HELP-NEXT:                         Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.
@@ -202,7 +202,7 @@
 ! HELP-FC1-NEXT:                         Generate code only for an OpenMP target device.
 ! HELP-FC1-NEXT: -fopenmp-target-debug   Enable debugging in the OpenMP offloading device RTL
 ! HELP-FC1-NEXT: -fopenmp-version=<value>
-! HELP-FC1-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang
+! HELP-FC1-NEXT:                         Set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). Default value is 51 for Clang
 ! HELP-FC1-NEXT: -fopenmp                Parse OpenMP pragmas and generate parallel code.
 ! HELP-FC1-NEXT: -fpass-plugin=<dsopath> Load pass plugin from a dynamic shared object file (only with new pass manager).
 ! HELP-FC1-NEXT: -fppc-native-vector-element-order

diff  --git a/openmp/docs/CommandLineArgumentReference.rst b/openmp/docs/CommandLineArgumentReference.rst
index ceea18e953e7cc..8c50482ca8e082 100644
--- a/openmp/docs/CommandLineArgumentReference.rst
+++ b/openmp/docs/CommandLineArgumentReference.rst
@@ -37,8 +37,7 @@ Use the static OpenMP host runtime while linking.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 Set the OpenMP version to a specific version ``<arg>`` of the OpenMP standard. 
 For example, you may use ``-fopenmp-version=45`` to select version 4.5 of 
-the OpenMP standard. The default value is ``-fopenmp-version=50`` for ``Clang`` 
-and ``-fopenmp-version=11`` for ``flang-new``.
+the OpenMP standard. The default value is ``-fopenmp-version=51`` for ``Clang``.
 
 .. _offload_command_line_arguments:
 


        


More information about the flang-commits mailing list