brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.3 KiB · f266793 Raw
91 lines · plain
1! Test the Parse Tree to ensure the OpenMP Loop Transformation Construct Fuse constructs a correct sequence2! and can correctly combine with loop nests3 4! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=51 %s | FileCheck %s --check-prefix=CHECK-PARSE5! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=51 %s | FileCheck %s --check-prefix=CHECK-UNPARSE6 7subroutine loop_transformation_construct8  implicit none9  integer :: I = 1010  integer :: j11 12  !$omp do13  !$omp fuse14  do i = 1, I15    continue16  end do17  !$omp tile sizes(2)18    do j = 1, I19      continue20    end do21  !$omp end fuse22  !$omp end do23end subroutine24 25!CHECK-PARSE: | ExecutionPart -> Block26!CHECK-PARSE-NEXT: | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPLoopConstruct27!CHECK-PARSE-NEXT: | | | OmpBeginLoopDirective28!CHECK-PARSE-NEXT: | | | | OmpDirectiveName -> llvm::omp::Directive = do29!CHECK-PARSE-NEXT: | | | | OmpClauseList ->30!CHECK-PARSE-NEXT: | | | | Flags = {}31!CHECK-PARSE-NEXT: | | | Block32!CHECK-PARSE-NEXT: | | | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPLoopConstruct33!CHECK-PARSE-NEXT: | | | | | OmpBeginLoopDirective34!CHECK-PARSE-NEXT: | | | | | | OmpDirectiveName -> llvm::omp::Directive = fuse35!CHECK-PARSE-NEXT: | | | | | | OmpClauseList ->36!CHECK-PARSE-NEXT: | | | | | | Flags = {}37!CHECK-PARSE-NEXT: | | | | | Block38!CHECK-PARSE-NEXT: | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> DoConstruct39!CHECK-PARSE-NEXT: | | | | | | | NonLabelDoStmt40!CHECK-PARSE-NEXT: | | | | | | | | LoopControl -> LoopBounds41!CHECK-PARSE-NEXT: | | | | | | | | | Scalar -> Name = 'i'42!CHECK-PARSE-NEXT: | | | | | | | | | Scalar -> Expr = '1_4'43!CHECK-PARSE-NEXT: | | | | | | | | | | LiteralConstant -> IntLiteralConstant = '1'44!CHECK-PARSE-NEXT: | | | | | | | | | Scalar -> Expr = 'i'45!CHECK-PARSE-NEXT: | | | | | | | | | | Designator -> DataRef -> Name = 'i'46!CHECK-PARSE-NEXT: | | | | | | | Block47!CHECK-PARSE-NEXT: | | | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> ContinueStmt48!CHECK-PARSE-NEXT: | | | | | | | EndDoStmt ->49!CHECK-PARSE-NEXT: | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPLoopConstruct50!CHECK-PARSE-NEXT: | | | | | | | OmpBeginLoopDirective51!CHECK-PARSE-NEXT: | | | | | | | | OmpDirectiveName -> llvm::omp::Directive = tile52!CHECK-PARSE-NEXT: | | | | | | | | OmpClauseList -> OmpClause -> Sizes -> Scalar -> Integer -> Expr = '2_4'53!CHECK-PARSE-NEXT: | | | | | | | | | LiteralConstant -> IntLiteralConstant = '2'54!CHECK-PARSE-NEXT: | | | | | | | | Flags = {}55!CHECK-PARSE-NEXT: | | | | | | | Block56!CHECK-PARSE-NEXT: | | | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> DoConstruct57!CHECK-PARSE-NEXT: | | | | | | | | | NonLabelDoStmt58!CHECK-PARSE-NEXT: | | | | | | | | | | LoopControl -> LoopBounds59!CHECK-PARSE-NEXT: | | | | | | | | | | | Scalar -> Name = 'j'60!CHECK-PARSE-NEXT: | | | | | | | | | | | Scalar -> Expr = '1_4'61!CHECK-PARSE-NEXT: | | | | | | | | | | | | LiteralConstant -> IntLiteralConstant = '1'62!CHECK-PARSE-NEXT: | | | | | | | | | | | Scalar -> Expr = 'i'63!CHECK-PARSE-NEXT: | | | | | | | | | | | | Designator -> DataRef -> Name = 'i'64!CHECK-PARSE-NEXT: | | | | | | | | | Block65!CHECK-PARSE-NEXT: | | | | | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> ContinueStmt66!CHECK-PARSE-NEXT: | | | | | | | | | EndDoStmt ->67!CHECK-PARSE-NEXT: | | | | | OmpEndLoopDirective68!CHECK-PARSE-NEXT: | | | | | | OmpDirectiveName -> llvm::omp::Directive = fuse69!CHECK-PARSE-NEXT: | | | | | | OmpClauseList ->70!CHECK-PARSE-NEXT: | | | | | | Flags = {}71!CHECK-PARSE-NEXT: | | | OmpEndLoopDirective72!CHECK-PARSE-NEXT: | | | | OmpDirectiveName -> llvm::omp::Directive = do73!CHECK-PARSE-NEXT: | | | | OmpClauseList ->74!CHECK-PARSE-NEXT: | | | | Flags = {}75 76!CHECK-UNPARSE: SUBROUTINE loop_transformation_construct77!CHECK-UNPARSE-NEXT:  IMPLICIT NONE78!CHECK-UNPARSE-NEXT:  INTEGER :: i = 10_479!CHECK-UNPARSE-NEXT:  INTEGER j80!CHECK-UNPARSE-NEXT: !$OMP DO81!CHECK-UNPARSE-NEXT: !$OMP FUSE82!CHECK-UNPARSE-NEXT:  DO i=1_4,i83!CHECK-UNPARSE-NEXT:    CONTINUE84!CHECK-UNPARSE-NEXT:  END DO85!CHECK-UNPARSE-NEXT:  !$OMP TILE86!CHECK-UNPARSE-NEXT:  DO j=1_4,i87!CHECK-UNPARSE-NEXT:    CONTINUE88!CHECK-UNPARSE-NEXT:  END DO89!CHECK-UNPARSE-NEXT: !$OMP END FUSE90!CHECK-UNPARSE-NEXT: !$OMP END DO91