@@ -3353,11 +3353,12 @@ genLoopVars(mlir::Operation *op, Fortran::lower::AbstractConverter &converter,
3353
3353
}
3354
3354
3355
3355
static llvm::SmallVector<const Fortran::semantics::Symbol *>
3356
- genLoopAndReductionVars (mlir::Operation *op, Fortran::lower::AbstractConverter &converter,
3357
- mlir::Location &loc,
3358
- const llvm::SmallVector<const Fortran::semantics::Symbol *> &loopArgs,
3359
- const llvm::SmallVector<const Fortran::semantics::Symbol *> &reductionArgs,
3360
- llvm::SmallVector<mlir::Type> &reductionTypes) {
3356
+ genLoopAndReductionVars (
3357
+ mlir::Operation *op, Fortran::lower::AbstractConverter &converter,
3358
+ mlir::Location &loc,
3359
+ const llvm::SmallVector<const Fortran::semantics::Symbol *> &loopArgs,
3360
+ const llvm::SmallVector<const Fortran::semantics::Symbol *> &reductionArgs,
3361
+ llvm::SmallVector<mlir::Type> &reductionTypes) {
3361
3362
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder ();
3362
3363
3363
3364
llvm::SmallVector<mlir::Type> blockArgTypes;
@@ -3372,7 +3373,7 @@ genLoopAndReductionVars(mlir::Operation *op, Fortran::lower::AbstractConverter &
3372
3373
loopVarTypeSize = std::max (loopVarTypeSize, arg->GetUltimate ().size ());
3373
3374
mlir::Type loopVarType = getLoopVarType (converter, loopVarTypeSize);
3374
3375
std::fill_n (std::back_inserter (blockArgTypes), loopArgs.size (),
3375
- loopVarType);
3376
+ loopVarType);
3376
3377
std::fill_n (std::back_inserter (blockArgLocs), loopArgs.size (), loc);
3377
3378
}
3378
3379
if (reductionArgs.size ()) {
@@ -3386,12 +3387,12 @@ genLoopAndReductionVars(mlir::Operation *op, Fortran::lower::AbstractConverter &
3386
3387
if (loopArgs.size ()) {
3387
3388
mlir::Operation *storeOp = nullptr ;
3388
3389
for (auto [argIndex, argSymbol] : llvm::enumerate (loopArgs)) {
3389
- mlir::Value indexVal =
3390
+ mlir::Value indexVal =
3390
3391
fir::getBase (op->getRegion (0 ).front ().getArgument (argIndex));
3391
3392
storeOp =
3392
3393
createAndSetPrivatizedLoopVar (converter, loc, indexVal, argSymbol);
3393
3394
}
3394
- firOpBuilder.setInsertionPointAfter (storeOp);
3395
+ firOpBuilder.setInsertionPointAfter (storeOp);
3395
3396
}
3396
3397
// Bind the reduction arguments to their block arguments
3397
3398
for (auto [arg, prv] : llvm::zip_equal (
@@ -3543,14 +3544,15 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
3543
3544
[](mlir::Value v) { return v.getType (); });
3544
3545
3545
3546
auto ivCallback = [&](mlir::Operation *op) {
3546
- return genLoopAndReductionVars (op, converter, loc, iv, reductionSymbols, reductionTypes);
3547
+ return genLoopAndReductionVars (op, converter, loc, iv, reductionSymbols,
3548
+ reductionTypes);
3547
3549
};
3548
3550
3549
3551
createBodyOfOp<mlir::omp::WsLoopOp>(
3550
3552
wsLoopOp, OpWithBodyGenInfo (converter, semaCtx, loc, *nestedEval)
3551
3553
.setClauses (&beginClauseList)
3552
3554
.setDataSharingProcessor (&dsp)
3553
- .setReductions (&reductionSymbols, &reductionTypes)
3555
+ .setReductions (&reductionSymbols, &reductionTypes)
3554
3556
.setGenRegionEntryCb (ivCallback));
3555
3557
}
3556
3558
0 commit comments