Skip to content

Commit ec0e40b

Browse files
committed
Revert "[flang][OpenMP] Support delayed privatisation for composite distribute simd (llvm#151169)"
This reverts commit a361cde.
1 parent d325951 commit ec0e40b

File tree

2 files changed

+9
-35
lines changed

2 files changed

+9
-35
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3094,16 +3094,11 @@ static mlir::omp::DistributeOp genCompositeDistributeSimd(
30943094
genSimdClauses(converter, semaCtx, simdItem->clauses, loc, simdClauseOps,
30953095
simdReductionSyms);
30963096

3097-
DataSharingProcessor distributeItemDSP(
3098-
converter, semaCtx, distributeItem->clauses, eval,
3099-
/*shouldCollectPreDeterminedSymbols=*/false,
3100-
/*useDelayedPrivatization=*/true, symTable);
3101-
distributeItemDSP.processStep1(&distributeClauseOps);
3102-
3103-
DataSharingProcessor simdItemDSP(converter, semaCtx, simdItem->clauses, eval,
3104-
/*shouldCollectPreDeterminedSymbols=*/true,
3105-
/*useDelayedPrivatization=*/true, symTable);
3106-
simdItemDSP.processStep1(&simdClauseOps);
3097+
// TODO: Support delayed privatization.
3098+
DataSharingProcessor dsp(converter, semaCtx, simdItem->clauses, eval,
3099+
/*shouldCollectPreDeterminedSymbols=*/true,
3100+
/*useDelayedPrivatization=*/false, symTable);
3101+
dsp.processStep1();
31073102

31083103
// Pass the innermost leaf construct's clauses because that's where COLLAPSE
31093104
// is placed by construct decomposition.
@@ -3114,15 +3109,13 @@ static mlir::omp::DistributeOp genCompositeDistributeSimd(
31143109

31153110
// Operation creation.
31163111
EntryBlockArgs distributeArgs;
3117-
distributeArgs.priv.syms = distributeItemDSP.getDelayedPrivSymbols();
3118-
distributeArgs.priv.vars = distributeClauseOps.privateVars;
3112+
// TODO: Add private syms and vars.
31193113
auto distributeOp = genWrapperOp<mlir::omp::DistributeOp>(
31203114
converter, loc, distributeClauseOps, distributeArgs);
31213115
distributeOp.setComposite(/*val=*/true);
31223116

31233117
EntryBlockArgs simdArgs;
3124-
simdArgs.priv.syms = simdItemDSP.getDelayedPrivSymbols();
3125-
simdArgs.priv.vars = simdClauseOps.privateVars;
3118+
// TODO: Add private syms and vars.
31263119
simdArgs.reduction.syms = simdReductionSyms;
31273120
simdArgs.reduction.vars = simdClauseOps.reductionVars;
31283121
auto simdOp =
@@ -3132,7 +3125,7 @@ static mlir::omp::DistributeOp genCompositeDistributeSimd(
31323125
genLoopNestOp(converter, symTable, semaCtx, eval, loc, queue, simdItem,
31333126
loopNestClauseOps, iv,
31343127
{{distributeOp, distributeArgs}, {simdOp, simdArgs}},
3135-
llvm::omp::Directive::OMPD_distribute_simd, simdItemDSP);
3128+
llvm::omp::Directive::OMPD_distribute_simd, dsp);
31363129
return distributeOp;
31373130
}
31383131

flang/test/Lower/OpenMP/distribute-simd.f90

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
subroutine distribute_simd_aligned(A)
88
use iso_c_binding
99
type(c_ptr) :: A
10-
10+
1111
!$omp teams
1212

1313
! CHECK: omp.distribute
@@ -57,22 +57,3 @@ subroutine distribute_simd_simdlen()
5757

5858
!$omp end teams
5959
end subroutine distribute_simd_simdlen
60-
61-
! CHECK-LABEL: func.func @_QPdistribute_simd_private(
62-
subroutine distribute_simd_private()
63-
integer, allocatable :: tmp
64-
! CHECK: omp.teams
65-
!$omp teams
66-
! CHECK: omp.distribute
67-
! CHECK: omp.simd
68-
! CHECK-SAME: private(@[[PRIV_BOX_SYM:.*]] %{{.*}} -> %[[PRIV_BOX:.*]], @[[PRIV_IVAR_SYM:.*]] %{{.*}} -> %[[PRIV_IVAR:.*]] : !fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<i32>)
69-
! CHECK-NEXT: omp.loop_nest (%[[IVAR:.*]]) : i32
70-
!$omp distribute simd private(tmp)
71-
do index_ = 1, 10
72-
! CHECK: %[[PRIV_BOX_DECL:.*]]:2 = hlfir.declare %[[PRIV_BOX]]
73-
! CHECK: %[[PRIV_IVAR_DECL:.*]]:2 = hlfir.declare %[[PRIV_IVAR]]
74-
! CHECK: hlfir.assign %[[IVAR]] to %[[PRIV_IVAR_DECL]]#0
75-
end do
76-
!$omp end distribute simd
77-
!$omp end teams
78-
end subroutine distribute_simd_private

0 commit comments

Comments
 (0)