Skip to content

Commit 3d04bd6

Browse files
author
Razvan Lupusoru
committed
Fix format
1 parent fb1b8c8 commit 3d04bd6

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

flang/lib/Lower/OpenACC.cpp

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,15 +1317,15 @@ mlir::Type getTypeFromBounds(llvm::SmallVector<mlir::Value> &bounds,
13171317
}
13181318

13191319
template <typename RecipeOp>
1320-
static void genPrivatizationRecipes(
1321-
const Fortran::parser::AccObjectList &objectList,
1322-
Fortran::lower::AbstractConverter &converter,
1323-
Fortran::semantics::SemanticsContext &semanticsContext,
1324-
Fortran::lower::StatementContext &stmtCtx,
1325-
llvm::SmallVectorImpl<mlir::Value> &dataOperands,
1326-
llvm::ArrayRef<mlir::Value> async,
1327-
llvm::ArrayRef<mlir::Attribute> asyncDeviceTypes,
1328-
llvm::ArrayRef<mlir::Attribute> asyncOnlyDeviceTypes) {
1320+
static void
1321+
genPrivatizationRecipes(const Fortran::parser::AccObjectList &objectList,
1322+
Fortran::lower::AbstractConverter &converter,
1323+
Fortran::semantics::SemanticsContext &semanticsContext,
1324+
Fortran::lower::StatementContext &stmtCtx,
1325+
llvm::SmallVectorImpl<mlir::Value> &dataOperands,
1326+
llvm::ArrayRef<mlir::Value> async,
1327+
llvm::ArrayRef<mlir::Attribute> asyncDeviceTypes,
1328+
llvm::ArrayRef<mlir::Attribute> asyncOnlyDeviceTypes) {
13291329
fir::FirOpBuilder &builder = converter.getFirOpBuilder();
13301330
Fortran::evaluate::ExpressionAnalyzer ea{semanticsContext};
13311331
for (const auto &accObject : objectList.v) {
@@ -2011,14 +2011,14 @@ mlir::Type getTypeFromIvTypeSize(fir::FirOpBuilder &builder,
20112011
return builder.getIntegerType(ivTypeSize * 8);
20122012
}
20132013

2014-
static void
2015-
privatizeIv(Fortran::lower::AbstractConverter &converter,
2016-
const Fortran::semantics::Symbol &sym, mlir::Location loc,
2017-
llvm::SmallVector<mlir::Type> &ivTypes,
2018-
llvm::SmallVector<mlir::Location> &ivLocs,
2019-
llvm::SmallVector<mlir::Value> &privateOperands,
2020-
llvm::SmallVector<mlir::Value> &ivPrivate,
2021-
bool isDoConcurrent = false) {
2014+
static void privatizeIv(Fortran::lower::AbstractConverter &converter,
2015+
const Fortran::semantics::Symbol &sym,
2016+
mlir::Location loc,
2017+
llvm::SmallVector<mlir::Type> &ivTypes,
2018+
llvm::SmallVector<mlir::Location> &ivLocs,
2019+
llvm::SmallVector<mlir::Value> &privateOperands,
2020+
llvm::SmallVector<mlir::Value> &ivPrivate,
2021+
bool isDoConcurrent = false) {
20222022
fir::FirOpBuilder &builder = converter.getFirOpBuilder();
20232023

20242024
mlir::Type ivTy = getTypeFromIvTypeSize(builder, sym);
@@ -2358,8 +2358,7 @@ static mlir::acc::LoopOp createLoopOp(
23582358

23592359
const auto &name = std::get<Fortran::parser::Name>(control.t);
23602360
privatizeIv(converter, *name.symbol, currentLocation, ivTypes, ivLocs,
2361-
privateOperands, ivPrivate,
2362-
isDoConcurrent);
2361+
privateOperands, ivPrivate, isDoConcurrent);
23632362

23642363
inclusiveBounds.push_back(true);
23652364
}
@@ -2807,15 +2806,13 @@ static Op createComputeOp(
28072806
if (!combinedConstructs)
28082807
genPrivatizationRecipes<mlir::acc::PrivateRecipeOp>(
28092808
privateClause->v, converter, semanticsContext, stmtCtx,
2810-
privateOperands, async, asyncDeviceTypes,
2811-
asyncOnlyDeviceTypes);
2809+
privateOperands, async, asyncDeviceTypes, asyncOnlyDeviceTypes);
28122810
} else if (const auto *firstprivateClause =
28132811
std::get_if<Fortran::parser::AccClause::Firstprivate>(
28142812
&clause.u)) {
28152813
genPrivatizationRecipes<mlir::acc::FirstprivateRecipeOp>(
28162814
firstprivateClause->v, converter, semanticsContext, stmtCtx,
2817-
firstprivateOperands, async,
2818-
asyncDeviceTypes, asyncOnlyDeviceTypes);
2815+
firstprivateOperands, async, asyncDeviceTypes, asyncOnlyDeviceTypes);
28192816
} else if (const auto *reductionClause =
28202817
std::get_if<Fortran::parser::AccClause::Reduction>(
28212818
&clause.u)) {
@@ -2826,8 +2823,8 @@ static Op createComputeOp(
28262823
// instead.
28272824
if (!combinedConstructs) {
28282825
genReductions(reductionClause->v, converter, semanticsContext, stmtCtx,
2829-
reductionOperands, async,
2830-
asyncDeviceTypes, asyncOnlyDeviceTypes);
2826+
reductionOperands, async, asyncDeviceTypes,
2827+
asyncOnlyDeviceTypes);
28312828
} else {
28322829
auto crtDataStart = dataClauseOperands.size();
28332830
genDataOperandOperations<mlir::acc::CopyinOp>(

mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ static ParseResult parseRecipeSym(mlir::OpAsmParser &parser,
462462
}
463463

464464
static void printRecipeSym(mlir::OpAsmPrinter &p, mlir::Operation *op,
465-
mlir::SymbolRefAttr recipeAttr) {
465+
mlir::SymbolRefAttr recipeAttr) {
466466
p << recipeAttr;
467467
}
468468

0 commit comments

Comments
 (0)