Skip to content

Commit 2772692

Browse files
[Flang][OpenMP] NFC: Code-format changes
1 parent 3a48630 commit 2772692

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

flang/lib/Lower/OpenMP.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,11 +3353,12 @@ genLoopVars(mlir::Operation *op, Fortran::lower::AbstractConverter &converter,
33533353
}
33543354

33553355
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) {
33613362
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
33623363

33633364
llvm::SmallVector<mlir::Type> blockArgTypes;
@@ -3372,7 +3373,7 @@ genLoopAndReductionVars(mlir::Operation *op, Fortran::lower::AbstractConverter &
33723373
loopVarTypeSize = std::max(loopVarTypeSize, arg->GetUltimate().size());
33733374
mlir::Type loopVarType = getLoopVarType(converter, loopVarTypeSize);
33743375
std::fill_n(std::back_inserter(blockArgTypes), loopArgs.size(),
3375-
loopVarType);
3376+
loopVarType);
33763377
std::fill_n(std::back_inserter(blockArgLocs), loopArgs.size(), loc);
33773378
}
33783379
if (reductionArgs.size()) {
@@ -3386,12 +3387,12 @@ genLoopAndReductionVars(mlir::Operation *op, Fortran::lower::AbstractConverter &
33863387
if (loopArgs.size()) {
33873388
mlir::Operation *storeOp = nullptr;
33883389
for (auto [argIndex, argSymbol] : llvm::enumerate(loopArgs)) {
3389-
mlir::Value indexVal =
3390+
mlir::Value indexVal =
33903391
fir::getBase(op->getRegion(0).front().getArgument(argIndex));
33913392
storeOp =
33923393
createAndSetPrivatizedLoopVar(converter, loc, indexVal, argSymbol);
33933394
}
3394-
firOpBuilder.setInsertionPointAfter(storeOp);
3395+
firOpBuilder.setInsertionPointAfter(storeOp);
33953396
}
33963397
// Bind the reduction arguments to their block arguments
33973398
for (auto [arg, prv] : llvm::zip_equal(
@@ -3543,14 +3544,15 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
35433544
[](mlir::Value v) { return v.getType(); });
35443545

35453546
auto ivCallback = [&](mlir::Operation *op) {
3546-
return genLoopAndReductionVars(op, converter, loc, iv, reductionSymbols, reductionTypes);
3547+
return genLoopAndReductionVars(op, converter, loc, iv, reductionSymbols,
3548+
reductionTypes);
35473549
};
35483550

35493551
createBodyOfOp<mlir::omp::WsLoopOp>(
35503552
wsLoopOp, OpWithBodyGenInfo(converter, semaCtx, loc, *nestedEval)
35513553
.setClauses(&beginClauseList)
35523554
.setDataSharingProcessor(&dsp)
3553-
.setReductions(&reductionSymbols, &reductionTypes)
3555+
.setReductions(&reductionSymbols, &reductionTypes)
35543556
.setGenRegionEntryCb(ivCallback));
35553557
}
35563558

0 commit comments

Comments
 (0)