121 Commits

Author SHA1 Message Date
Ritanya-B-Bharadwaj
63635c1746
[clang] [OpenMP] New OpenMP 6.0 self_maps clause (#129888)
Initial parsing/sema support for self maps in map and requirement clause
[Sections 7.9.6 and 10.5.1.6 in OpenMP 6.0 spec]
2025-03-11 16:31:42 +05:30
Zahira Ammarguellat
cf69b4c668
[Clang] [OpenMP] Add support for '#pragma omp stripe'. (#126927)
This patch was reviewed and approved here:
https://github.com/llvm/llvm-project/pull/119891
However it has been reverted here:
083df25dc2
due to a build issue here:
https://lab.llvm.org/buildbot/#/builders/51/builds/10694

This patch is reintroducing the support.
2025-02-13 07:14:36 -05:00
Kazu Hirata
67e1e98811 Revert "[Clang] [OpenMP] Add support for '#pragma omp stripe'. (#119891)"
This reverts commit 070f84ebc89b11df616a83a56df9ac56efbab783.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/51/builds/10694
2025-02-11 12:39:01 -08:00
Zahira Ammarguellat
070f84ebc8
[Clang] [OpenMP] Add support for '#pragma omp stripe'. (#119891)
Implement basic parsing and semantic support for `#pragma omp stripe`
constuct introduced in
https://www.openmp.org/wp-content/uploads/[OpenMP-API-Specification-6-0.pdf](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf),
section 11.7.
2025-02-11 13:58:21 -05:00
David Pagan
898112e529
[OpenMP][Docs] Update OpenMP supported features table (#126292)
Updated status to 'done' for OpenMP 6.0 features:
  - OpenMP directives in concurrent loop regions
  - atomics constructs on concurrent loop regions
  - Lift nesting restriction on concurrent loop

Removed duplicate OpenMP 6.0 feature per Michael Klemm:
  - atomic constructs in loop region
2025-02-07 14:53:49 -08:00
David Pagan
a5fc7c3ac1
[clang][OpenMP] New OpenMP 6.0 assumption clause, 'no_openmp_constructs' (#125933)
Add initial parsing/sema support for new assumption clause so clause can
be specified. For now, it's ignored, just like the others.

Added support for 'no_openmp_construct' to release notes.

Testing
- Updated appropriate LIT tests.
- Testing: check-all
2025-02-06 12:41:10 -08:00
SunilKuravinakop
2feee52457
Claiming "threadset clause" for implementation. (#126023)
threadset clause is part of free-agent threads. But, free-agent threads
also involves runtime implementation. So, added an separate entry for
threadset clause and claimed it for clang.

---------

Co-authored-by: Sunil Kuravinakop <kuravina@pe31.hpc.amslabs.hpecorp.net>
2025-02-06 12:00:57 -06:00
David Pagan
ad38e24eb7
[clang][OpenMP] Add 'align' modifier for 'allocate' clause (#121814)
The 'align' modifier is now accepted in the 'allocate' clause. Added LIT
tests covering codegen, PCH, template handling, and serialization for
'align' modifier.

Added support for align-modifier to release notes.

Testing
- New allocate modifier LIT tests.
- OpenMP LIT tests.
- check-all
2025-01-13 05:44:48 -08:00
CatherineMoore
c85d5163b1
[Clang][OpenMP][Doc] Update OpenMPSupport.rst (#122174)
This patch adds a section for OpenMP 6.0 features.

---------

Co-authored-by: Joseph Huber <huberjn@outlook.com>
2025-01-09 08:33:37 -06:00
CHANDRA GHALE
aedb30fdc7
[OpenMP] codegen support for masked combined construct parallel masked taskloop (#121741)
Added codegen support for combined masked constructs Parallel masked
taskloop.
Added implementation for EmitOMPParallelMaskedTaskLoopDirective.

---------

Co-authored-by: Chandra Ghale <ghale@pe31.hpc.amslabs.hpecorp.net>
2025-01-09 16:38:36 +05:30
ShashwathiNavada
612f8ec7ac
seq_cst is allowed in Flush since OpenMP 5.1. (#114072)
This PR adds support seq_cst (sequential consistency) clause for the
flush directive in OpenMP. The seq_cst clause enforces a stricter memory
ordering, ensuring that all threads observe the memory effects of the
flush in the same order, improving consistency in memory operations
across threads.

---------

Co-authored-by: Shashwathi N <nshashwa@pe28vega.hpc.amslabs.hpecorp.net>
Co-authored-by: CHANDRA GHALE <chandra.nitdgp@gmail.com>
2024-11-25 16:08:39 +05:30
David Pagan
270f7cf68a
[OpenMP][Docs] Update OpenMP supported features table (#115106)
OpenMP features table: added 'allocator' modifier for 'allocate' clause
as a completed feature in OpenMP 5.1 Implementation Details.
2024-11-06 09:45:45 -08:00
David Pagan
9b5a3036ad
[OpenMP][Docs] Update OpenMP supported features table (#109726)
OpenMP features table: updated scope directive status from 'worked on'
to 'done' in section OpenMP 5.1 Implementation Details.
2024-09-23 19:59:28 -07:00
cchen
eb8cc89295 [NFC] Claim OpenMP feature - target_device selector set 2024-09-12 11:10:38 -05:00
Shilei Tian
1c269929d0
[Clang][Sema][OpenMP] Allow thread_limit to accept multiple expressions (#102715) 2024-08-10 09:54:58 -04:00
Shilei Tian
31a999c1ad [Clang][Doc] Fix an error in OpenMPSupport.rst 2024-08-06 13:28:35 -04:00
Shilei Tian
cee594cf36
[Clang][Sema][OpenMP] Allow num_teams to accept multiple expressions (#99732)
By the OpenMP standard, `num_teams` clause can only accept one
expression (for now). In this patch, we extend it to allow to accept
multiple expressions when it is used with `target teams ompx_bare`
construct. This will allow to launch a multi-dim grid, same as CUDA/HIP.
2024-08-06 10:55:15 -04:00
Julian Brown
a42e515e3a
[OpenMP] OpenMP 5.1 "assume" directive parsing support (#92731)
This is a minimal patch to support parsing for "omp assume" directives.
These are meant to be hints to a compiler's optimisers: as such, it is
legitimate (if not very useful) to ignore them. The patch builds on top
of the existing support for "omp assumes" directives (note spelling!).

Unlike the "omp [begin/end] assumes" directives, "omp assume" is
associated with a compound statement, i.e. it can appear within a
function. The "holds" assumption could (theoretically) be mapped onto
the existing builtin "__builtin_assume", though the latter applies to a
single point in the program, and the former to a range (i.e. the whole
of the associated compound statement).

This patch fixes sollve's OpenMP 5.1 "omp assume"-based tests.
2024-08-05 07:37:07 -04:00
jyu2-git
d8b61dd84b
[OpenMP] Generate implicit default mapper for mapping array section. (#101101)
This is only for struct containing nested structs with user defined
mappers.

Add four functions:
1>buildImplicitMap: build map for default mapper
2>buildImplicitMapper:  build default mapper.
3>hasUserDefinedMapper for given mapper name and mapper type, lookup
user defined map, if found one return true.
4>isImplicitMapperNeeded check if Mapper is needed

During create map, in checkMappableExpressionList, call
isImplicitMapperNeeded when it return true, call buildImplicitMapper to
generate implicit mapper and added to map clause.

https://github.com/llvm/llvm-project/pull/101101
2024-08-02 17:22:40 -07:00
Shilei Tian
ad836c1569
[OpenMP][Doc] Add ompx_bare entry in OpenMPSupport.rst (#101711) 2024-08-02 13:30:37 -04:00
SunilKuravinakop
4b25508583
Notifying assume directive as 'worked on'. (#90022)
Notifying assume directive as 'worked on'. When checked on slack
channel, nobody was working on assume directive.

 Changes to be committed:
	modified:   clang/docs/OpenMPSupport.rst

---------

Co-authored-by: Sunil Kuravinakop
2024-04-26 10:31:55 +05:30
Yuanfang Chen
e1ceb3f392
[Clang][NFC] Fix sphinx documentation
Fixes #45339
2023-09-29 00:22:58 -07:00
Joseph Huber
c2e92cb490 [Docs] Fix table after previous document update
Summary:
Someone broke this table in the documentation. Fix it by adding the
proper spacing.
2023-09-19 19:33:29 -05:00
Johannes Doerfert
98d5ab706e
[OpenMP][Docs][NFC] Update documentation
Removed lots of outdated statements that were misleading.
2023-09-19 22:08:43 +01:00
Anton Rydahl
c1b5674fbb [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
2023-08-28 19:05:55 -07:00
Chi Chun Chen
59fdd4c071 [NFC] Update OpenMP Support page for Clang/LLVM 17
Updating the status for a number of features in the OpenMP support page for Clang/LLVM 17.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D156894
2023-08-25 15:50:39 -05:00
Fazlay Rabbi
e4c7298bea [OpenMP 5.1] Parsing and Sema support for scope directive
structured-block

where clause is one of the following:

private(list)
reduction([reduction-modifier ,] reduction-identifier : list)
nowait

Differential Revision: https://reviews.llvm.org/D157933
2023-08-24 18:13:52 -07:00
Vignesh Balasubramanian
658490abc9 [OpenMP][OMPD][Doc] Update OMPD implementations details.
OMPD is already pushed to LLVM repo through https://reviews.llvm.org/D100181 .
Currently, it supports Openmp 5.0 standard for the host in Linux machines.

Reviewed By: @jdoerfert
Differential Revision: https://reviews.llvm.org/D156878
2023-08-08 13:11:35 +05:30
Dave Pagan
f6204724df [OpenMP][Docs] Update OpenMP supported features table
Updated status of alignment clause for allocate directive in
OpenMP features table, section OpenMP 5.1 Implementation Details.

Differential Revision: https://reviews.llvm.org/D157135
2023-08-07 19:16:13 -04:00
Michael Halkenhaeuser
99ce17b71c [clang][docs][OpenMP] Update status of OMPT support.
Update documentation on implementation status of OMPT.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D156336
2023-07-27 06:16:13 -04:00
Dave Pagan
b41bf9d857 [OpenMP][Docs] Update 'loop' directive status in OpenMP support.
Update status of #pragma omp loop (directive) and loop bind.
2023-07-26 08:34:01 -05:00
Aaron Ballman
77ac634c64 Fix the Clang sphinx build
This addresses issues found by:
https://lab.llvm.org/buildbot/#/builders/92/builds/47783
2023-07-24 07:32:48 -04:00
Sandeep Kosuri
239ad4fde8 [OPENMP][NFC] Editing OpenMP support page 2023-07-24 05:43:07 -05:00
Joseph Huber
a37d747222 [OpenMP][Docs] Add some things to the OpenMP support
This patch adds some information that we have support for in the OpenMP
clang support page.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D155727
2023-07-19 13:17:39 -05:00
Shilei Tian
00971f0860 [NFC][Doc] Update feature support doc clang/docs/OpenMPSupport.rst to correct
the color of finished task
2023-06-28 11:07:29 -04:00
Sandeep Kosuri
f4ef08433f [OPENMP][NFC] added loop bind to the support page 2023-02-10 02:33:44 -06:00
Shilei Tian
6e18277a51 [OpenMP] Implement omp_get_mapped_ptr
This patch implements the function `omp_get_mapped_ptr`.

Fix #59945.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D141545
2023-01-11 22:05:42 -05:00
Chi Chun Chen
6d076780a8 [OpenMP][NFC] Claim thread_limit clause in target directive 2022-11-17 00:44:44 -06:00
Chi Chun Chen
445a2ab605 [OpenMP][NFC] Unclaim iterators in 'map' clause and motion clauses 2022-11-08 11:43:07 -06:00
Chi Chun Chen
ccc12a2376 [OpenMP][NFC] Claim iterators in 'map' clause and motion clauses 2022-07-21 15:50:22 -05:00
tlattner
eb1ffd817c Update references to Discourse instead of the mailing lists.
Update the references to the old Mailman mailing lists to point to Discourse forums.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D128766
2022-07-08 11:16:47 -07:00
Chi Chun Chen
6c3990acfb [OpenMP][NFC] Claim order clause modifiers (reproducible and unconstrained) 2022-07-07 11:30:03 -05:00
Joel E. Denny
0103d4da74 [Clang][OpenMP] Don't overload "extension" in status doc
In Clang's OpenMPSupport.rst, "extension" is currently overloaded to
describe both:

1. Standard OpenMP features that appear only in recent versions of the
   OpenMP spec.
2. Non-standard features supported by Clang.  This usage appears in
   the final table on the page.

Last fall, we discussed this issue in the OpenMP in LLVM call and
agreed it should be corrected.  This patch takes the simple approach
of dropping the word "extension" for all occurrences of the first
usage.  The result seems to read well.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D126549
2022-06-27 18:41:17 -04:00
Chi Chun Chen
92fd2eb74f [Clang][OpenMP] Claim nowait clause on taskwait 2022-06-27 11:02:39 -05:00
Shilei Tian
b917433835 [NFC][Doc] Finish atomic compare 2022-06-02 21:50:07 -04:00
Mike Rice
48d6a6c9ad [OpenMP][NFC] update status for 'omp_all_memory' directive to 'done' 2022-06-02 17:31:33 -07:00
Joel E. Denny
4a36813669 [OpenACC][OpenMP] Document atomic-in-teams extension
That is, put D126323 in the status doc and explain its relationship to
OpenACC support.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D126547
2022-05-27 18:53:19 -04:00
Joseph Huber
15e62062c0 [Clang][Docs] Update information on the new driver now that it's default
Summary:
This patch updates some of the documentation on the new driver now that
it's the default. Also the ABI for embedding these images changed.
2022-04-18 15:05:09 -04:00
dreachem
02a05097e7 [OpenMP][NFC] update status for 5.1 'nothing' directive to 'worked on'
Differential Revision: https://reviews.llvm.org/D119440
2022-02-10 09:22:44 -06:00
Joseph Huber
28ab5944cd [Clang][Docs] Add documention for new OpenMP offloading driver
This patch adds more documentation for the OpenMP offloading driver.
This includes a new file that describes the overall pipeline becuase
that was not previously explained in full elsewhere.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D118815
2022-02-03 13:09:49 -05:00