Skip to content

Commit c5aec84

Browse files
committed
Fix formatting
1 parent 1090379 commit c5aec84

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3577,7 +3577,7 @@ processReductionCombiner(lower::AbstractConverter &converter,
35773577
const parser::OmpStylizedInstance &combinerInstance =
35783578
combinerExpression.v.front();
35793579
const parser::OmpStylizedInstance::Instance &instance =
3580-
std::get<parser::OmpStylizedInstance::Instance>(combinerInstance.t);
3580+
std::get<parser::OmpStylizedInstance::Instance>(combinerInstance.t);
35813581
if (const auto *as = std::get_if<parser::AssignmentStmt>(&instance.u)) {
35823582
auto &expr = std::get<parser::Expr>(as->t);
35833583
genCombinerCB = [&](fir::FirOpBuilder &builder, mlir::Location loc,
@@ -3586,7 +3586,8 @@ processReductionCombiner(lower::AbstractConverter &converter,
35863586
const auto &evalExpr = makeExpr(expr, semaCtx);
35873587
lower::SymMapScope scope(symTable);
35883588
const std::list<parser::OmpStylizedDeclaration> &declList =
3589-
std::get<std::list<parser::OmpStylizedDeclaration>>(combinerInstance.t);
3589+
std::get<std::list<parser::OmpStylizedDeclaration>>(
3590+
combinerInstance.t);
35903591
for (const parser::OmpStylizedDeclaration &decl : declList) {
35913592
auto &name = std::get<parser::ObjectName>(decl.var.t);
35923593
mlir::Value addr = lhs;
@@ -3599,13 +3600,13 @@ processReductionCombiner(lower::AbstractConverter &converter,
35993600

36003601
assert(name.symbol && "Reduction object name does not have a symbol");
36013602
if (!fir::conformsWithPassByRef(type)) {
3602-
addr = builder.createTemporary(loc, type);
3603-
fir::StoreOp::create(builder, loc, isRhs ? rhs : lhs, addr);
3603+
addr = builder.createTemporary(loc, type);
3604+
fir::StoreOp::create(builder, loc, isRhs ? rhs : lhs, addr);
36043605
}
36053606
fir::FortranVariableFlagsEnum extraFlags = {};
36063607
fir::FortranVariableFlagsAttr attributes =
3607-
Fortran::lower::translateSymbolAttributes(builder.getContext(),
3608-
*name.symbol, extraFlags);
3608+
Fortran::lower::translateSymbolAttributes(builder.getContext(),
3609+
*name.symbol, extraFlags);
36093610
auto declareOp = hlfir::DeclareOp::create(
36103611
builder, loc, addr, name.ToString(), nullptr, {}, nullptr, nullptr,
36113612
0, attributes);
@@ -3615,8 +3616,7 @@ processReductionCombiner(lower::AbstractConverter &converter,
36153616
lower::StatementContext stmtCtx;
36163617
mlir::Value result = fir::getBase(
36173618
convertExprToValue(loc, converter, evalExpr, symTable, stmtCtx));
3618-
if (auto refType =
3619-
llvm::dyn_cast<fir::ReferenceType>(result.getType()))
3619+
if (auto refType = llvm::dyn_cast<fir::ReferenceType>(result.getType()))
36203620
if (lhs.getType() == refType.getElementType())
36213621
result = fir::LoadOp::create(builder, loc, result);
36223622
stmtCtx.finalizeAndPop();

flang/lib/Lower/Support/ReductionProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ bool ReductionProcessor::doReductionByRef(mlir::Type reductionType) {
619619
!fir::isa_derived(fir::unwrapRefType(reductionType)))
620620
return true;
621621

622-
return false;
622+
return false;
623623
}
624624

625625
bool ReductionProcessor::doReductionByRef(mlir::Value reductionVar) {

flang/lib/Optimizer/OpenMP/MarkDeclareTarget.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ class MarkDeclareTargetPass
6565
}
6666
}
6767

68-
void
69-
processReductionRefs(std::optional<mlir::ArrayAttr> symRefs,
70-
ParentInfo parentInfo,
71-
llvm::SmallPtrSet<mlir::Operation *, 16> visited) {
68+
void processReductionRefs(std::optional<mlir::ArrayAttr> symRefs,
69+
ParentInfo parentInfo,
70+
llvm::SmallPtrSet<mlir::Operation *, 16> visited) {
7271
if (!symRefs)
7372
return;
7473

@@ -82,11 +81,10 @@ class MarkDeclareTargetPass
8281
}
8382

8483
void
85-
processReductionClauses(mlir::Operation *op,
86-
ParentInfo parentInfo,
84+
processReductionClauses(mlir::Operation *op, ParentInfo parentInfo,
8785
llvm::SmallPtrSet<mlir::Operation *, 16> visited) {
8886
llvm::TypeSwitch<mlir::Operation &>(*op)
89-
.Case([&](mlir::omp::LoopOp op) {
87+
.Case([&](mlir::omp::LoopOp op) {
9088
processReductionRefs(op.getReductionSyms(), parentInfo, visited);
9189
})
9290
.Case([&](mlir::omp::ParallelOp op) {

0 commit comments

Comments
 (0)