brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.3 KiB · fe987c2 Raw
166 lines · plain
1!RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s2!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine f00(x, y)5  implicit none6  integer :: x, y7  !$omp target map(x, y)8  x = y + 19  y = 2 * x10  !$omp end target11end12 13!UNPARSE: SUBROUTINE f00 (x, y)14!UNPARSE:  IMPLICIT NONE15!UNPARSE:  INTEGER x, y16!UNPARSE: !$OMP TARGET  MAP(x,y)17!UNPARSE:   x=y+1_418!UNPARSE:   y=2_4*x19!UNPARSE: !$OMP END TARGET20!UNPARSE: END SUBROUTINE21 22!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpBlockConstruct23!PARSE-TREE: | OmpBeginDirective24!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = target25!PARSE-TREE: | | OmpClauseList -> OmpClause -> Map -> OmpMapClause26!PARSE-TREE: | | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'27!PARSE-TREE: | | | OmpObject -> Designator -> DataRef -> Name = 'y'28!PARSE-TREE: | | | bool = 'true'29!PARSE-TREE: | Block30!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'x=y+1_4'31!PARSE-TREE: | | | Variable = 'x'32!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'x'33!PARSE-TREE: | | | Expr = 'y+1_4'34!PARSE-TREE: | | | | Add35!PARSE-TREE: | | | | | Expr = 'y'36!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'y'37!PARSE-TREE: | | | | | Expr = '1_4'38!PARSE-TREE: | | | | | | LiteralConstant -> IntLiteralConstant = '1'39!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'y=2_4*x'40!PARSE-TREE: | | | Variable = 'y'41!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'y'42!PARSE-TREE: | | | Expr = '2_4*x'43!PARSE-TREE: | | | | Multiply44!PARSE-TREE: | | | | | Expr = '2_4'45!PARSE-TREE: | | | | | | LiteralConstant -> IntLiteralConstant = '2'46!PARSE-TREE: | | | | | Expr = 'x'47!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'x'48!PARSE-TREE: | OmpEndDirective49!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = target50!PARSE-TREE: | | OmpClauseList ->51 52 53subroutine f01(x, y)54  implicit none55  integer :: x, y56  !$omp target map(x, y)57  block58    x = y + 159    y = 2 * x60  endblock61  ! No end-directive62end63 64!UNPARSE: SUBROUTINE f01 (x, y)65!UNPARSE:  IMPLICIT NONE66!UNPARSE:  INTEGER x, y67!UNPARSE: !$OMP TARGET  MAP(x,y)68!UNPARSE:  BLOCK69!UNPARSE:    x=y+1_470!UNPARSE:    y=2_4*x71!UNPARSE:  END BLOCK72!UNPARSE: END SUBROUTINE73 74!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpBlockConstruct75!PARSE-TREE: | OmpBeginDirective76!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = target77!PARSE-TREE: | | OmpClauseList -> OmpClause -> Map -> OmpMapClause78!PARSE-TREE: | | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'79!PARSE-TREE: | | | OmpObject -> Designator -> DataRef -> Name = 'y'80!PARSE-TREE: | | | bool = 'true'81!PARSE-TREE: | Block82!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> BlockConstruct83!PARSE-TREE: | | | BlockStmt ->84!PARSE-TREE: | | | BlockSpecificationPart -> SpecificationPart85!PARSE-TREE: | | | | ImplicitPart ->86!PARSE-TREE: | | | Block87!PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'x=y+1_4'88!PARSE-TREE: | | | | | Variable = 'x'89!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'x'90!PARSE-TREE: | | | | | Expr = 'y+1_4'91!PARSE-TREE: | | | | | | Add92!PARSE-TREE: | | | | | | | Expr = 'y'93!PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'y'94!PARSE-TREE: | | | | | | | Expr = '1_4'95!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '1'96!PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'y=2_4*x'97!PARSE-TREE: | | | | | Variable = 'y'98!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'y'99!PARSE-TREE: | | | | | Expr = '2_4*x'100!PARSE-TREE: | | | | | | Multiply101!PARSE-TREE: | | | | | | | Expr = '2_4'102!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '2'103!PARSE-TREE: | | | | | | | Expr = 'x'104!PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'x'105!PARSE-TREE: | | | EndBlockStmt ->106 107 108subroutine f02(x, y)109  implicit none110  integer :: x, y111  !$omp target map(x, y)112  block113    x = y + 1114    y = 2 * x115  endblock116  ! End-directive present117  !$omp end target118end119 120!UNPARSE: SUBROUTINE f02 (x, y)121!UNPARSE:  IMPLICIT NONE122!UNPARSE:  INTEGER x, y123!UNPARSE: !$OMP TARGET  MAP(x,y)124!UNPARSE:  BLOCK125!UNPARSE:    x=y+1_4126!UNPARSE:    y=2_4*x127!UNPARSE:  END BLOCK128!UNPARSE: !$OMP END TARGET129!UNPARSE: END SUBROUTINE130 131!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpBlockConstruct132!PARSE-TREE: | OmpBeginDirective133!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = target134!PARSE-TREE: | | OmpClauseList -> OmpClause -> Map -> OmpMapClause135!PARSE-TREE: | | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'136!PARSE-TREE: | | | OmpObject -> Designator -> DataRef -> Name = 'y'137!PARSE-TREE: | | | bool = 'true'138!PARSE-TREE: | Block139!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> BlockConstruct140!PARSE-TREE: | | | BlockStmt ->141!PARSE-TREE: | | | BlockSpecificationPart -> SpecificationPart142!PARSE-TREE: | | | | ImplicitPart ->143!PARSE-TREE: | | | Block144!PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'x=y+1_4'145!PARSE-TREE: | | | | | Variable = 'x'146!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'x'147!PARSE-TREE: | | | | | Expr = 'y+1_4'148!PARSE-TREE: | | | | | | Add149!PARSE-TREE: | | | | | | | Expr = 'y'150!PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'y'151!PARSE-TREE: | | | | | | | Expr = '1_4'152!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '1'153!PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'y=2_4*x'154!PARSE-TREE: | | | | | Variable = 'y'155!PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'y'156!PARSE-TREE: | | | | | Expr = '2_4*x'157!PARSE-TREE: | | | | | | Multiply158!PARSE-TREE: | | | | | | | Expr = '2_4'159!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '2'160!PARSE-TREE: | | | | | | | Expr = 'x'161!PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'x'162!PARSE-TREE: | | | EndBlockStmt ->163!PARSE-TREE: | OmpEndDirective164!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = target165!PARSE-TREE: | | OmpClauseList ->166