Skip to content

Commit acbc6cd

Browse files
committed
[flang][acc] Reorder the generation of data exit
1 parent a509073 commit acbc6cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Lower/OpenACC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3028,6 +3028,8 @@ static Op createComputeOp(
30283028
builder.setInsertionPointAfter(computeOp);
30293029

30303030
// Create the exit operations after the region.
3031+
genDataExitOperations<mlir::acc::ReductionOp, mlir::acc::CopyoutOp>(
3032+
builder, reductionEntryOperands, /*structured=*/true);
30313033
genDataExitOperations<mlir::acc::CopyinOp, mlir::acc::CopyoutOp>(
30323034
builder, copyEntryOperands, /*structured=*/true);
30333035
genDataExitOperations<mlir::acc::CopyinOp, mlir::acc::DeleteOp>(
@@ -3042,8 +3044,6 @@ static Op createComputeOp(
30423044
builder, nocreateEntryOperands, /*structured=*/true);
30433045
genDataExitOperations<mlir::acc::PresentOp, mlir::acc::DeleteOp>(
30443046
builder, presentEntryOperands, /*structured=*/true);
3045-
genDataExitOperations<mlir::acc::ReductionOp, mlir::acc::CopyoutOp>(
3046-
builder, reductionEntryOperands, /*structured=*/true);
30473047

30483048
builder.restoreInsertionPoint(insPt);
30493049
return computeOp;

0 commit comments

Comments
 (0)