2021-02-18 02:53:05 +08:00
|
|
|
! RUN: %flang_fc1 -fsyntax-only -fdebug-pre-fir-tree -fopenacc %s | FileCheck %s
|
[flang][openacc] Skeleton for OpenACC construct lowering
Summary:
This patch introduce the basic infrastructure to be able to lower
OpenACC constructs to the future OpenACC dialect.
Reviewers: schweitz, kiranchandramohan, DavidTruby, sscalpone, jdoerfert, ichoyjx
Reviewed By: ichoyjx
Subscribers: ichoyjx, SouraVX, mgorny, jfb, sstefan1, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D84195
2020-07-23 09:32:57 +08:00
|
|
|
|
|
|
|
! Test structure of the Pre-FIR tree with OpenACC construct
|
|
|
|
|
|
|
|
! CHECK: Subroutine foo
|
|
|
|
subroutine foo()
|
|
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
|
|
!$acc parallel
|
|
|
|
!$acc loop
|
|
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
|
|
do i=1,5
|
|
|
|
! CHECK-NEXT: PrintStmt
|
|
|
|
print *, "hey"
|
|
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
|
|
do j=1,5
|
|
|
|
! CHECK-NEXT: PrintStmt
|
|
|
|
print *, "hello", i, j
|
|
|
|
! CHECK-NEXT: EndDoStmt
|
|
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
|
|
end do
|
|
|
|
! CHECK-NEXT: EndDoStmt
|
|
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
|
|
end do
|
|
|
|
!$acc end parallel
|
|
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
|
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
2021-03-10 04:28:34 +08:00
|
|
|
! CHECK-NEXT: EndSubroutineStmt
|
[flang][openacc] Skeleton for OpenACC construct lowering
Summary:
This patch introduce the basic infrastructure to be able to lower
OpenACC constructs to the future OpenACC dialect.
Reviewers: schweitz, kiranchandramohan, DavidTruby, sscalpone, jdoerfert, ichoyjx
Reviewed By: ichoyjx
Subscribers: ichoyjx, SouraVX, mgorny, jfb, sstefan1, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D84195
2020-07-23 09:32:57 +08:00
|
|
|
end subroutine
|
2021-03-10 04:28:34 +08:00
|
|
|
! CHECK-NEXT: End Subroutine foo
|
[flang][openacc] Skeleton for OpenACC construct lowering
Summary:
This patch introduce the basic infrastructure to be able to lower
OpenACC constructs to the future OpenACC dialect.
Reviewers: schweitz, kiranchandramohan, DavidTruby, sscalpone, jdoerfert, ichoyjx
Reviewed By: ichoyjx
Subscribers: ichoyjx, SouraVX, mgorny, jfb, sstefan1, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D84195
2020-07-23 09:32:57 +08:00
|
|
|
|
2020-08-14 02:04:43 +08:00
|
|
|
! CHECK: Subroutine foo
|
|
|
|
subroutine foo2()
|
|
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
|
|
!$acc parallel loop
|
|
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
|
|
do i=1,5
|
|
|
|
! CHECK-NEXT: EndDoStmt
|
|
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
|
|
end do
|
|
|
|
!$acc end parallel loop
|
|
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
2021-03-10 04:28:34 +08:00
|
|
|
! CHECK-NEXT: EndSubroutineStmt
|
2020-08-14 02:04:43 +08:00
|
|
|
end subroutine
|
2021-03-10 04:28:34 +08:00
|
|
|
! CHECK-NEXT: End Subroutine foo2
|
2020-08-14 02:04:43 +08:00
|
|
|
|