forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move reduction lowering from DistributeOp to TeamsOp and use teams re…
…duction clauses to generate info. (#159) * Move teams reductions from distribute to teams and use the reduction clause for the teams directive to create the reduction information. * Remove composite matching framework since this is no longer needed with the new teams reduction implementation.
- Loading branch information
Showing
14 changed files
with
212 additions
and
350 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! RUN: %flang_fc1 -emit-fir -fopenmp -o - %s | FileCheck %s | ||
! RUN: bbc -emit-fir -fopenmp -o - %s | FileCheck %s | ||
|
||
! CHECK: omp.teams | ||
! CHECK-SAME: reduction(@add_reduction_i32 %{{.*}} -> %{{.*}} : !fir.ref<i32>) | ||
subroutine myfun() | ||
integer :: i, j | ||
i = 0 | ||
j = 0 | ||
!$omp target teams distribute parallel do reduction(+:i) | ||
do j = 1,5 | ||
i = i + j | ||
end do | ||
!$omp end target teams distribute parallel do | ||
end subroutine myfun |
1 change: 0 additions & 1 deletion
1
...est/Lower/OpenMP/Todo/reduction-teams.f90 → flang/test/Lower/OpenMP/reduction-teams.f90
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
Oops, something went wrong.