forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 2
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 parser support for grainsize and num_tasks clause (…
…llvm#113136) These clauses are applicable only for the taskloop directive. Since the directive has a TODO error, skipping the addition of TODOs for these clauses.
- Loading branch information
1 parent
eef3766
commit 5621929
Showing
9 changed files
with
122 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s | ||
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s | ||
|
||
subroutine parallel_work | ||
integer :: i | ||
|
||
!CHECK: !$OMP TASKLOOP GRAINSIZE(STRICT:500_4) | ||
!PARSE-TREE: OmpBeginLoopDirective | ||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = taskloop | ||
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Grainsize -> OmpGrainsizeClause | ||
!PARSE-TREE-NEXT: Prescriptiveness = Strict | ||
!PARSE-TREE-NEXT: Scalar -> Integer -> Expr = '500_4' | ||
!$omp taskloop grainsize(strict: 500) | ||
do i=1,10000 | ||
call loop_body(i) | ||
end do | ||
!$omp end taskloop | ||
|
||
!CHECK: !$OMP TASKLOOP GRAINSIZE(500_4) | ||
!PARSE-TREE: OmpBeginLoopDirective | ||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = taskloop | ||
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Grainsize -> OmpGrainsizeClause | ||
!PARSE-TREE-NEXT: Scalar -> Integer -> Expr = '500_4' | ||
!$omp taskloop grainsize(500) | ||
do i=1,10000 | ||
call loop_body(i) | ||
end do | ||
!$omp end taskloop | ||
|
||
!CHECK: !$OMP TASKLOOP NUM_TASKS(STRICT:500_4) | ||
!PARSE-TREE: OmpBeginLoopDirective | ||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = taskloop | ||
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> NumTasks -> OmpNumTasksClause | ||
!PARSE-TREE-NEXT: Prescriptiveness = Strict | ||
!PARSE-TREE-NEXT: Scalar -> Integer -> Expr = '500_4' | ||
!$omp taskloop num_tasks(strict: 500) | ||
do i=1,10000 | ||
call loop_body(i) | ||
end do | ||
!$omp end taskloop | ||
end subroutine parallel_work |
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