Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][OpenMP] Add semantic checks for cancellation nesting
This patch implements the following semantic checks for cancellation constructs: ``` OpenMP Version 5.0 Section 2.18.1: CANCEL construct restriction: If construct-type-clause is taskgroup, the cancel construct must be closely nested inside a task or a taskloop construct and the cancel region must be closely nested inside a taskgroup region. If construct-type-clause is sections, the cancel construct must be closely nested inside a sections or section construct. Otherwise, the cancel construct must be closely nested inside an OpenMP construct that matches the type specified in construct-type-clause of the cancel construct. OpenMP Version 5.0 Section 2.18.2: CANCELLATION POINT restriction: A cancellation point construct for which construct-type-clause is taskgroup must be closely nested inside a task or taskloop construct, and the cancellation point region must be closely nested inside a taskgroup region. A cancellation point construct for which construct-type-clause is sections must be closely nested inside a sections or section construct. A cancellation point construct for which construct-type-clause is neither sections nor taskgroup must be closely nested inside an OpenMP construct that matches the type specified in construct-type-clause. ``` Also add test cases for the check. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D106538
- Loading branch information
1 parent
d754b97
commit 70894c8
Showing
5 changed files
with
633 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.