[flang-commits] [flang] 4367701 - [Flang][Docs][NFC] Move OpenMP API extensions to separate document (#186981)
via flang-commits
flang-commits at lists.llvm.org
Fri Apr 10 05:50:48 PDT 2026
Author: Michael Klemm
Date: 2026-04-10T14:50:42+02:00
New Revision: 4367701f6ea981ff8c69a73edf8d6650354d6612
URL: https://github.com/llvm/llvm-project/commit/4367701f6ea981ff8c69a73edf8d6650354d6612
DIFF: https://github.com/llvm/llvm-project/commit/4367701f6ea981ff8c69a73edf8d6650354d6612.diff
LOG: [Flang][Docs][NFC] Move OpenMP API extensions to separate document (#186981)
This PR follows suit of the Extensions.md document and provides the same
file for OpenMP API extensions. These have previously been stored in
OpenMPSupport.md. Having a more centralized view and place for these
extensions seems useful.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot at users.noreply.github.com>
Added:
flang/docs/OpenMP-extensions.md
Modified:
flang/docs/OpenMPSupport.md
flang/docs/index.md
Removed:
################################################################################
diff --git a/flang/docs/OpenMP-extensions.md b/flang/docs/OpenMP-extensions.md
new file mode 100644
index 0000000000000..07eada5adc1fd
--- /dev/null
+++ b/flang/docs/OpenMP-extensions.md
@@ -0,0 +1,42 @@
+<!--===- docs/OpenMP-extensions.md
+
+ Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+ See https://llvm.org/LICENSE.txt for license information.
+ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+-->
+
+(openmp-extensions)=
+# OpenMP API Extensions Supported by Flang
+
+See also {doc}`OpenMPSupport` for a general overview of OpenMP support in Flang.
+
+```{contents}
+---
+local:
+---
+```
+
+The Flang compiler supports several extensions to OpenMP API features, providing enhanced parallelism and data management capabilities for Fortran applications. This document outlines the supported extensions and their usage within Flang.
+
+
+## Supported OpenMP API Extensions
+
+The following extensions are supported by Flang.
+
+
+### ATOMIC Construct
+The implementation of the ATOMIC construct follows OpenMP 6.0 with the following extensions:
+- `x = x` is an allowed form of ATOMIC UPDATE.
+ This is motivated by the fact that the equivalent forms `x = x+0` or `x = x*1` are allowed.
+- Explicit type conversions are allowed in ATOMIC READ, WRITE or UPDATE constructs, and in the capture statement in ATOMIC UPDATE CAPTURE.
+ The OpenMP spec requires intrinsic- or pointer-assignments, which include (as per the Fortran standard) implicit type conversions. Since such conversions need to be handled, allowing explicit conversions comes at no extra cost.
+- A literal `.true.` or `.false.` is an allowed condition in ATOMIC UPDATE COMPARE. [1]
+- A logical variable is an allowed form of the condition even if its value is not computed within the ATOMIC UPDATE COMPARE construct [1].
+- `expr equalop x` is an allowed condition in ATOMIC UPDATE COMPARE. [1]
+
+
+### Data-sharing Clauses and Directives
+- Using `COMMON` block variables in an `EQUIVALENCE` statement in `THREADPRIVATE` directives.
+
+[1] Code generation for ATOMIC UPDATE COMPARE is not implemented yet.
diff --git a/flang/docs/OpenMPSupport.md b/flang/docs/OpenMPSupport.md
index 274297a22140b..f5c6619123090 100644
--- a/flang/docs/OpenMPSupport.md
+++ b/flang/docs/OpenMPSupport.md
@@ -61,15 +61,3 @@ Note : No distinction is made between the support in Parser/Semantics, MLIR, Low
| teams distribute parallel loop simd construct | P | Implicit linearization is skipped if iv is a pointer or allocatable |
| target teams distribute parallel loop simd construct | P | Implicit linearization is completely skipped |
-## Extensions
-### ATOMIC construct
-The implementation of the ATOMIC construct follows OpenMP 6.0 with the following extensions:
-- `x = x` is an allowed form of ATOMIC UPDATE.
-This is motivated by the fact that the equivalent forms `x = x+0` or `x = x*1` are allowed.
-- Explicit type conversions are allowed in ATOMIC READ, WRITE or UPDATE constructs, and in the capture statement in ATOMIC UPDATE CAPTURE.
-The OpenMP spec requires intrinsic- or pointer-assignments, which include (as per the Fortran standard) implicit type conversions. Since such conversions need to be handled, allowing explicit conversions comes at no extra cost.
-- A literal `.true.` or `.false.` is an allowed condition in ATOMIC UPDATE COMPARE. [1]
-- A logical variable is an allowed form of the condition even if its value is not computed within the ATOMIC UPDATE COMPARE construct [1].
-- `expr equalop x` is an allowed condition in ATOMIC UPDATE COMPARE. [1]
-
-[1] Code generation for ATOMIC UPDATE COMPARE is not implemented yet.
diff --git a/flang/docs/index.md b/flang/docs/index.md
index 67df710113a92..029f49a353d8f 100644
--- a/flang/docs/index.md
+++ b/flang/docs/index.md
@@ -28,6 +28,7 @@ on how to get in touch with us and to learn more about the current status.
Extensions
Directives
OpenMPSupport
+ OpenMP-extensions
Real16MathSupport
Unsigned
FAQ
More information about the flang-commits
mailing list