|
| 1 | +!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=60 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s |
| 2 | +!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=60 %s | FileCheck --check-prefix="PARSE-TREE" %s |
| 3 | + |
| 4 | +subroutine f00(x) |
| 5 | + integer :: x(10) |
| 6 | +!$omp task threadset(omp_pool) |
| 7 | + x = x + 1 |
| 8 | +!$omp end task |
| 9 | +end |
| 10 | + |
| 11 | +!UNPARSE: SUBROUTINE f00 (x) |
| 12 | +!UNPARSE: INTEGER x(10_4) |
| 13 | +!UNPARSE: !$OMP TASK THREADSET(OMP_POOL) |
| 14 | +!UNPARSE: x=x+1_4 |
| 15 | +!UNPARSE: !$OMP END TASK |
| 16 | +!UNPARSE: END SUBROUTINE |
| 17 | + |
| 18 | +!PARSE-TREE: OmpBeginDirective |
| 19 | +!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = task |
| 20 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> Threadset -> OmpThreadsetClause -> ThreadsetPolicy = Omp_Pool |
| 21 | + |
| 22 | +subroutine f001(x) |
| 23 | + integer :: x(10) |
| 24 | +!$omp task threadset(omp_team) |
| 25 | + x = x + 1 |
| 26 | +!$omp end task |
| 27 | +end |
| 28 | + |
| 29 | +!UNPARSE: SUBROUTINE f001 (x) |
| 30 | +!UNPARSE: INTEGER x(10_4) |
| 31 | +!UNPARSE: !$OMP TASK THREADSET(OMP_TEAM) |
| 32 | +!UNPARSE: x=x+1_4 |
| 33 | +!UNPARSE: !$OMP END TASK |
| 34 | +!UNPARSE: END SUBROUTINE |
| 35 | + |
| 36 | +!PARSE-TREE: OmpBeginDirective |
| 37 | +!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = task |
| 38 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> Threadset -> OmpThreadsetClause -> ThreadsetPolicy = Omp_Team |
| 39 | + |
| 40 | + |
| 41 | +subroutine f002(x) |
| 42 | + integer :: i |
| 43 | +!$omp taskloop threadset(omp_team) |
| 44 | + do i = 1, 10 |
| 45 | + end do |
| 46 | +!$omp end taskloop |
| 47 | +end |
| 48 | + |
| 49 | +!UNPARSE: SUBROUTINE f002 (x) |
| 50 | +!UNPARSE: INTEGER i |
| 51 | +!UNPARSE: !$OMP TASKLOOP THREADSET(OMP_TEAM) |
| 52 | +!UNPARSE: DO i=1_4,10_4 |
| 53 | +!UNPARSE: END DO |
| 54 | +!UNPARSE: !$OMP END TASK |
| 55 | +!UNPARSE: END SUBROUTINE |
| 56 | + |
| 57 | +!PARSE-TREE: OmpBeginLoopDirective |
| 58 | +!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = taskloop |
| 59 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> Threadset -> OmpThreadsetClause -> ThreadsetPolicy = Omp_Team |
| 60 | + |
| 61 | +subroutine f003(x) |
| 62 | + integer :: i |
| 63 | +!$omp taskloop threadset(omp_team) |
| 64 | + do i = 1, 10 |
| 65 | + end do |
| 66 | +!$omp end taskloop |
| 67 | +end |
| 68 | + |
| 69 | +!UNPARSE: SUBROUTINE f003 (x) |
| 70 | +!UNPARSE: INTEGER i |
| 71 | +!UNPARSE: !$OMP TASKLOOP THREADSET(OMP_POOL) |
| 72 | +!UNPARSE: DO i=1_4,10_4 |
| 73 | +!UNPARSE: END DO |
| 74 | +!UNPARSE: !$OMP END TASK |
| 75 | +!UNPARSE: END SUBROUTINE |
| 76 | + |
| 77 | +!PARSE-TREE: OmpBeginLoopDirective |
| 78 | +!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = taskloop |
| 79 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> Threadset -> OmpThreadsetClause -> ThreadsetPolicy = Omp_Pool |
0 commit comments