-
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.
[flang][OpenMP] Parse lastprivate modifier, add TODO to lowering (#11…
…0568) Parse the lastprivate clause with a modifier. Codegen for it is not yet implemented.
- Loading branch information
Showing
14 changed files
with
160 additions
and
19 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s | ||
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s | ||
|
||
! CHECK: not yet implemented: lastprivate clause with CONDITIONAL modifier | ||
subroutine foo() | ||
integer :: x, i | ||
x = 1 | ||
!$omp parallel do lastprivate(conditional: x) | ||
do i = 1, 100 | ||
x = x + 1 | ||
enddo | ||
end |
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,54 @@ | ||
! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s | ||
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=50 %s | FileCheck --check-prefix="PARSE-TREE" %s | ||
|
||
subroutine foo1() | ||
integer :: x, i | ||
x = 1 | ||
!$omp parallel do lastprivate(x) | ||
do i = 1, 100 | ||
x = x + 1 | ||
enddo | ||
end | ||
|
||
!UNPARSE: SUBROUTINE foo1 | ||
!UNPARSE: INTEGER x, i | ||
!UNPARSE: x=1_4 | ||
!UNPARSE: !$OMP PARALLEL DO LASTPRIVATE(x) | ||
!UNPARSE: DO i=1_4,100_4 | ||
!UNPARSE: x=x+1_4 | ||
!UNPARSE: END DO | ||
!UNPARSE: END SUBROUTINE | ||
|
||
!PARSE-TREE: SubroutineStmt | ||
!PARSE-TREE: Name = 'foo1' | ||
!PARSE-TREE: OmpLoopDirective -> llvm::omp::Directive = parallel do | ||
!PARSE-TREE: OmpClauseList -> OmpClause -> Lastprivate -> OmpLastprivateClause | ||
!PARSE-TREE: OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x' | ||
!PARSE-TREE: EndSubroutineStmt | ||
|
||
|
||
subroutine foo2() | ||
integer :: x, i | ||
x = 1 | ||
!$omp parallel do lastprivate(conditional: x) | ||
do i = 1, 100 | ||
x = x + 1 | ||
enddo | ||
end | ||
|
||
!UNPARSE: SUBROUTINE foo2 | ||
!UNPARSE: INTEGER x, i | ||
!UNPARSE: x=1_4 | ||
!UNPARSE: !$OMP PARALLEL DO LASTPRIVATE(CONDITIONAL:x) | ||
!UNPARSE: DO i=1_4,100_4 | ||
!UNPARSE: x=x+1_4 | ||
!UNPARSE: END DO | ||
!UNPARSE: END SUBROUTINE | ||
|
||
!PARSE-TREE: SubroutineStmt | ||
!PARSE-TREE: Name = 'foo2' | ||
!PARSE-TREE: OmpLoopDirective -> llvm::omp::Directive = parallel do | ||
!PARSE-TREE: OmpClauseList -> OmpClause -> Lastprivate -> OmpLastprivateClause | ||
!PARSE-TREE: LastprivateModifier = Conditional | ||
!PARSE-TREE: OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x' | ||
!PARSE-TREE: EndSubroutineStmt |
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