@@ -2556,27 +2556,24 @@ genDeclareInFunction(Fortran::lower::AbstractConverter &converter,
2556
2556
}
2557
2557
builder.create <mlir::acc::DeclareEnterOp>(loc, dataClauseOperands);
2558
2558
2559
- if (!createEntryOperands.empty () || !copyEntryOperands.empty () ||
2560
- !copyoutEntryOperands.empty () || !deviceResidentEntryOperands.empty ()) {
2561
- // Attach declare exit operation generation to function context.
2562
- fctCtx.attachCleanup ([&builder, loc, dataClauseOperands,
2563
- createEntryOperands, copyEntryOperands,
2564
- copyoutEntryOperands, deviceResidentEntryOperands]() {
2565
- builder.create <mlir::acc::DeclareExitOp>(loc, dataClauseOperands);
2566
- genDataExitOperations<mlir::acc::CreateOp, mlir::acc::DeleteOp>(
2567
- builder, createEntryOperands, /* structured=*/ true ,
2568
- /* implicit=*/ false );
2569
- genDataExitOperations<mlir::acc::DeclareDeviceResidentOp,
2570
- mlir::acc::DeleteOp>(
2571
- builder, deviceResidentEntryOperands, /* structured=*/ true ,
2572
- /* implicit=*/ false );
2573
- genDataExitOperations<mlir::acc::CopyinOp, mlir::acc::CopyoutOp>(
2574
- builder, copyEntryOperands, /* structured=*/ true , /* implicit=*/ false );
2575
- genDataExitOperations<mlir::acc::CreateOp, mlir::acc::CopyoutOp>(
2576
- builder, copyoutEntryOperands, /* structured=*/ true ,
2577
- /* implicit=*/ false );
2578
- });
2579
- }
2559
+ // Attach declare exit operation generation to function context.
2560
+ fctCtx.attachCleanup ([&builder, loc, dataClauseOperands, createEntryOperands,
2561
+ copyEntryOperands, copyoutEntryOperands,
2562
+ deviceResidentEntryOperands]() {
2563
+ builder.create <mlir::acc::DeclareExitOp>(loc, dataClauseOperands);
2564
+ genDataExitOperations<mlir::acc::CreateOp, mlir::acc::DeleteOp>(
2565
+ builder, createEntryOperands, /* structured=*/ true ,
2566
+ /* implicit=*/ false );
2567
+ genDataExitOperations<mlir::acc::DeclareDeviceResidentOp,
2568
+ mlir::acc::DeleteOp>(
2569
+ builder, deviceResidentEntryOperands, /* structured=*/ true ,
2570
+ /* implicit=*/ false );
2571
+ genDataExitOperations<mlir::acc::CopyinOp, mlir::acc::CopyoutOp>(
2572
+ builder, copyEntryOperands, /* structured=*/ true , /* implicit=*/ false );
2573
+ genDataExitOperations<mlir::acc::CreateOp, mlir::acc::CopyoutOp>(
2574
+ builder, copyoutEntryOperands, /* structured=*/ true ,
2575
+ /* implicit=*/ false );
2576
+ });
2580
2577
}
2581
2578
2582
2579
static void
0 commit comments