[llvm-branch-commits] [flang] [Flang][OpenMP] Push genEval closer to leaf lowering functions (PR #77760)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 11 04:52:48 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff a503d366249dd2c549abbdb614ac4a84a7be3af1 0205beb4b6c6c828fb654866ed4e97c0485e00c4 -- flang/lib/Lower/OpenMP.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index c0f5619344..6e93387fbf 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -2336,11 +2336,11 @@ static mlir::omp::MasterOp
genMasterOp(Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &eval, bool genNested,
mlir::Location currentLocation) {
- return genOpWithBody<mlir::omp::MasterOp>(
- converter, eval, genNested, currentLocation,
- /*outerCombined=*/false,
- /*clauseList=*/nullptr,
- /*resultTypes=*/mlir::TypeRange());
+ return genOpWithBody<mlir::omp::MasterOp>(converter, eval, genNested,
+ currentLocation,
+ /*outerCombined=*/false,
+ /*clauseList=*/nullptr,
+ /*resultTypes=*/mlir::TypeRange());
}
static mlir::omp::OrderedRegionOp
@@ -2377,8 +2377,8 @@ genParallelOp(Fortran::lower::AbstractConverter &converter,
cp.processReduction(currentLocation, reductionVars, reductionDeclSymbols);
return genOpWithBody<mlir::omp::ParallelOp>(
- converter, eval, genNested, currentLocation, outerCombined,
- &clauseList, /*resultTypes=*/mlir::TypeRange(), ifClauseOperand,
+ converter, eval, genNested, currentLocation, outerCombined, &clauseList,
+ /*resultTypes=*/mlir::TypeRange(), ifClauseOperand,
numThreadsClauseOperand, allocateOperands, allocatorOperands,
reductionVars,
reductionDeclSymbols.empty()
@@ -2395,10 +2395,9 @@ genSectionOp(Fortran::lower::AbstractConverter &converter,
const Fortran::parser::OmpClauseList §ionsClauseList) {
// Currently only private/firstprivate clause is handled, and
// all privatization is done within `omp.section` operations.
- return genOpWithBody<mlir::omp::SectionOp>(converter, eval, genNested,
- currentLocation,
- /*outerCombined=*/false,
- §ionsClauseList);
+ return genOpWithBody<mlir::omp::SectionOp>(
+ converter, eval, genNested, currentLocation,
+ /*outerCombined=*/false, §ionsClauseList);
}
static mlir::omp::SingleOp
@@ -2508,9 +2507,8 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
auto dataOp = converter.getFirOpBuilder().create<mlir::omp::DataOp>(
currentLocation, ifClauseOperand, deviceOperand, devicePtrOperands,
deviceAddrOperands, mapOperands);
- genBodyOfTargetDataOp(converter, eval, genNested, dataOp,
- useDeviceTypes, useDeviceLocs, useDeviceSymbols,
- currentLocation);
+ genBodyOfTargetDataOp(converter, eval, genNested, dataOp, useDeviceTypes,
+ useDeviceLocs, useDeviceSymbols, currentLocation);
return dataOp;
}
@@ -2820,8 +2818,8 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
currentLocation, ifClauseOperand, deviceOperand, threadLimitOperand,
nowaitAttr, mapOperands);
- genBodyOfTargetOp(converter, eval, genNested, targetOp,
- mapSymTypes, mapSymLocs, mapSymbols, currentLocation);
+ genBodyOfTargetOp(converter, eval, genNested, targetOp, mapSymTypes,
+ mapSymLocs, mapSymbols, currentLocation);
return targetOp;
}
@@ -2849,8 +2847,7 @@ genTeamsOp(Fortran::lower::AbstractConverter &converter,
currentLocation, llvm::omp::Directive::OMPD_teams);
return genOpWithBody<mlir::omp::TeamsOp>(
- converter, eval, genNested, currentLocation, outerCombined,
- &clauseList,
+ converter, eval, genNested, currentLocation, outerCombined, &clauseList,
/*num_teams_lower=*/nullptr, numTeamsClauseOperand, ifClauseOperand,
threadLimitClauseOperand, allocateOperands, allocatorOperands,
reductionVars,
@@ -2962,8 +2959,8 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
firOpBuilder.create<mlir::omp::TaskyieldOp>(currentLocation);
break;
case llvm::omp::Directive::OMPD_target_data:
- genDataOp(converter, eval, semanticsContext, genNested,
- currentLocation, opClauseList);
+ genDataOp(converter, eval, semanticsContext, genNested, currentLocation,
+ opClauseList);
break;
case llvm::omp::Directive::OMPD_target_enter_data:
genEnterExitUpdateDataOp<mlir::omp::EnterDataOp>(
``````````
</details>
https://github.com/llvm/llvm-project/pull/77760
More information about the llvm-branch-commits
mailing list