-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Changes for invoking Masked Operation (#98423)
PR adds changes to the flang frontend to create the `MaskedOp` when `masked` directive is used in the input program. Omp masked is introduced in 5.2 standard and allows a parallel region to be executed by threads specified by a programmer. This is achieved with the help of filter clause which helps to specify thread id expected to execute the region. Other related PRs: - [Fortran Parsing and Semantic Support](#91432) - Merged - [MLIR Support](https://github.com/llvm/llvm-project/pull/96022/files) - Merged - [Lowering Support](#98401) - Under Review
- Loading branch information
Showing
5 changed files
with
65 additions
and
14 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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s | ||
|
||
!CHECK-LABEL: func @_QPomp_masked | ||
subroutine omp_masked(threadId) | ||
integer :: threadId | ||
|
||
!CHECK: omp.masked { | ||
!$omp masked | ||
|
||
!CHECK: fir.call @_QPmasked() {{.*}}: () -> () | ||
call masked() | ||
|
||
!CHECK: omp.terminator | ||
!$omp end masked | ||
|
||
!CHECK: omp.masked filter({{.*}}) { | ||
!$omp masked filter(threadId) | ||
|
||
!CHECK: fir.call @_QPmaskedwithfilter() {{.*}}: () -> () | ||
call maskedWithFilter() | ||
|
||
!CHECK: omp.terminator | ||
!$omp end masked | ||
end subroutine omp_masked | ||
|