[flang-commits] [flang] 2c2ba7e - [Flang][OpenMP] Add OpenMP standards support doc (#132707)
via flang-commits
flang-commits at lists.llvm.org
Tue Apr 22 14:01:20 PDT 2025
Author: Kiran Chandramohan
Date: 2025-04-22T22:01:16+01:00
New Revision: 2c2ba7efd4d5f270e7dea2e6a5f0a22bd7aaecd0
URL: https://github.com/llvm/llvm-project/commit/2c2ba7efd4d5f270e7dea2e6a5f0a22bd7aaecd0
DIFF: https://github.com/llvm/llvm-project/commit/2c2ba7efd4d5f270e7dea2e6a5f0a22bd7aaecd0.diff
LOG: [Flang][OpenMP] Add OpenMP standards support doc (#132707)
Added:
flang/docs/OpenMPSupport.md
Modified:
flang/docs/index.md
Removed:
################################################################################
diff --git a/flang/docs/OpenMPSupport.md b/flang/docs/OpenMPSupport.md
new file mode 100644
index 0000000000000..2d4b9dd737777
--- /dev/null
+++ b/flang/docs/OpenMPSupport.md
@@ -0,0 +1,67 @@
+<!--===- docs/OpenMPSupport.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
+
+-->
+
+# Flang OpenMP Support
+
+```{contents}
+---
+local:
+---
+```
+
+This document outlines the OpenMP API features supported by Flang. It is intended as a general reference.
+For the most accurate information on unimplemented features, rely on the compiler’s TODO or “Not Yet Implemented”
+messages, which are considered authoritative. With the exception of a few corner cases, Flang
+offers full support for OpenMP 3.1 ([See details here](#openmp-31-openmp-25-openmp-11)).
+Partial support for OpenMP 4.0 is also available and currently under active development.
+The table below outlines the current status of OpenMP 4.0 feature support.
+Work is ongoing to add support for OpenMP 4.5 and newer versions; a support statement for these will be shared in the future.
+The table entries are derived from the information provided in the Version Differences subsection of the Features History section in the OpenMP standard.
+
+The feature support information is provided as a table with three columns that are self explanatory. The Status column uses
+the letters **P**, **Y**, **N** for the implementation status:
+- **P** : Partial. When the implementation is incomplete for a few cases
+- **Y** : Yes. When the implementation is complete
+- **N** : No. When the implementation is absent
+
+Note : No distinction is made between the support in Parser/Semantics, MLIR, Lowering or the OpenMPIRBuilder.
+
+## OpenMP 4.0
+
+| Feature | Status | Comments |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| proc_bind clause | Y | |
+| simd construct | P | linear clause is not supported |
+| declare simd construct | N | |
+| do simd construct | P | linear clause is not supported |
+| target data construct | P | device clause not supported |
+| target construct | P | device clause not supported |
+| target update construct | P | device clause not supported |
+| declare target directive | P | |
+| teams construct | P | reduction clause not supported |
+| distribute construct | P | dist_schedule clause not supported |
+| distribute simd construct | P | dist_schedule and linear clauses are not supported |
+| distribute parallel loop construct | P | dist_schedule clause not supported |
+| distribute parallel loop simd construct | P | dist_schedule and linear clauses are not supported |
+| depend clause | P | depend clause with array sections are not supported |
+| declare reduction construct | N | |
+| atomic construct extensions | Y | |
+| cancel construct | N | |
+| cancellation point construct | N | |
+| parallel do simd construct | P | linear clause is not supported |
+| target teams construct | P | device and reduction clauses are not supported |
+| teams distribute construct | P | reduction and dist_schedule clauses not supported |
+| teams distribute simd construct | P | reduction, dist_schedule and linear clauses are not supported |
+| target teams distribute construct | P | device, reduction and dist_schedule clauses are not supported |
+| teams distribute parallel loop construct | P | reduction and dist_schedule clauses are not supported |
+| target teams distribute parallel loop construct | P | device, reduction and dist_schedule clauses are not supported |
+| teams distribute parallel loop simd construct | P | reduction, dist_schedule, and linear clauses are not supported |
+| target teams distribute parallel loop simd construct | P | device, reduction, dist_schedule and linear clauses are not supported |
+
+## OpenMP 3.1, OpenMP 2.5, OpenMP 1.1
+All features except a few corner cases in atomic (complex type,
diff erent but compatible types in lhs and rhs), threadprivate (character type) constructs/clauses are supported.
diff --git a/flang/docs/index.md b/flang/docs/index.md
index 8ab5c0bcb2123..aedd3a6a45d6f 100644
--- a/flang/docs/index.md
+++ b/flang/docs/index.md
@@ -29,6 +29,7 @@ on how to get in touch with us and to learn more about the current status.
GettingInvolved
GettingStarted
ImplementingASemanticCheck
+ OpenMPSupport
PullRequestChecklist
```
More information about the flang-commits
mailing list