[flang-commits] [flang] [flang][OpenMP] Add lowering support for task detach (PR #119128)
via flang-commits
flang-commits at lists.llvm.org
Sun Dec 8 06:21:51 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 9eb4056144a9d2e940272ba9e9675acaa3fbb354 9039702ac11ea2b1efb389fec7b18c43bbd92539 --extensions cpp,h -- flang/lib/Lower/OpenMP/ClauseProcessor.cpp flang/lib/Lower/OpenMP/ClauseProcessor.h flang/lib/Lower/OpenMP/OpenMP.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
index 5f5f0c1e30..48c559a78b 100644
--- a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
@@ -459,13 +459,13 @@ bool ClauseProcessor::processPriority(
}
bool ClauseProcessor::processDetach(mlir::omp::DetachClauseOps &result) const {
- if (auto *clause = findUniqueClause<omp::clause::Detach>()) {
- semantics::Symbol *sym = clause->v.sym();
- mlir::Value symVal = converter.getSymbolAddress(*sym);
- result.eventHandle = symVal;
- return true;
- }
- return false;
+ if (auto *clause = findUniqueClause<omp::clause::Detach>()) {
+ semantics::Symbol *sym = clause->v.sym();
+ mlir::Value symVal = converter.getSymbolAddress(*sym);
+ result.eventHandle = symVal;
+ return true;
+ }
+ return false;
}
bool ClauseProcessor::processProcBind(
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 57bb16fcb4..2ef4d184a6 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2871,7 +2871,7 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
!std::holds_alternative<clause::InReduction>(clause.u) &&
!std::holds_alternative<clause::Mergeable>(clause.u) &&
!std::holds_alternative<clause::TaskReduction>(clause.u) &&
- !std::holds_alternative<clause::Detach>(clause.u)) {
+ !std::holds_alternative<clause::Detach>(clause.u)) {
std::string name =
parser::ToUpperCaseLetters(llvm::omp::getOpenMPClauseName(clause.id));
TODO(clauseLocation, name + " clause is not implemented yet");
``````````
</details>
https://github.com/llvm/llvm-project/pull/119128
More information about the flang-commits
mailing list