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 origin/main HEAD --extensions cpp --
clang/test/OpenMP/replayable_ast_print.cpp
clang/test/OpenMP/replayable_messages.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_recursive_reduction.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_reduction_minimal_taskloop.cpp
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_recursive_reduction.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_recursive_reduction.cpp
index c70778971..c349bd2f3 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_recursive_reduction.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_recursive_reduction.cpp
@@ -52,15 +52,17 @@ static volatile int Sum = 0;
static volatile int Snapshots[MaxDepth] = {0, 0, 0, 0};
__attribute__((noinline)) static void emit_reduction_taskloop(int seed) {
-#pragma omp taskloop replayable num_tasks(8)
\
- reduction(+ : Sum) firstprivate(saved : seed)
+#pragma omp taskloop replayable num_tasks(8) reduction(+ : Sum)
\
+ firstprivate(saved : seed)
for (int i = 0; i < 16; ++i)
Sum += seed + i;
}
__attribute__((noinline)) static void emit_publish_task(int slot) {
#pragma omp task replayable firstprivate(saved : slot)
- { Snapshots[slot] = Sum; }
+ {
+ Snapshots[slot] = Sum;
+ }
}
__attribute__((noinline)) static void driver(int depth, int seed) {
@@ -116,8 +118,7 @@ int main() {
recorded = run_taskgraph(Seeds[0]);
const int exp0 = expected_result(Seeds[0]);
if (recorded != exp0) {
- std::fprintf(stderr,
- "FAIL initial record got=%d expected=%d\n",
+ std::fprintf(stderr, "FAIL initial record got=%d expected=%d\n",
recorded, exp0);
failed = true;
}
@@ -127,9 +128,8 @@ int main() {
for (int i = 1; i < NumRuns; ++i) {
const int replayed = run_taskgraph(Seeds[i]);
if (replayed != recorded) {
- std::fprintf(stderr,
- "FAIL replay %d seed=%d got=%d recorded=%d\n",
- i, Seeds[i], replayed, recorded);
+ std::fprintf(stderr, "FAIL replay %d seed=%d got=%d recorded=%d\n",
i,
+ Seeds[i], replayed, recorded);
failed = true;
}
}
@@ -139,8 +139,8 @@ int main() {
if (failed)
return 1;
- std::fprintf(stderr,
- "PASS non-lexical recursive reduction result=%d\n", recorded);
+ std::fprintf(stderr, "PASS non-lexical recursive reduction result=%d\n",
+ recorded);
return 0;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_reduction_minimal_taskloop.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_reduction_minimal_taskloop.cpp
index f4cfecefd..17b36f16a 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_reduction_minimal_taskloop.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_reduction_minimal_taskloop.cpp
@@ -35,8 +35,8 @@
static volatile int Sum = 0;
__attribute__((noinline)) static void emit_reduction_taskloop(int seed) {
-#pragma omp taskloop replayable num_tasks(8)
\
- reduction(+ : Sum) firstprivate(saved : seed)
+#pragma omp taskloop replayable num_tasks(8) reduction(+ : Sum)
\
+ firstprivate(saved : seed)
for (int i = 0; i < 16; ++i)
Sum += seed + i;
}
@@ -73,8 +73,7 @@ int main() {
recorded = run_taskgraph(Seeds[0]);
const int exp0 = expected_result(Seeds[0]);
if (recorded != exp0) {
- std::fprintf(stderr,
- "FAIL initial record got=%d expected=%d\n",
+ std::fprintf(stderr, "FAIL initial record got=%d expected=%d\n",
recorded, exp0);
failed = true;
}
@@ -86,9 +85,8 @@ int main() {
for (int i = 1; i < NumRuns; ++i) {
const int replayed = run_taskgraph(Seeds[i]);
if (replayed != recorded) {
- std::fprintf(stderr,
- "FAIL replay %d seed=%d got=%d recorded=%d\n",
- i, Seeds[i], replayed, recorded);
+ std::fprintf(stderr, "FAIL replay %d seed=%d got=%d recorded=%d\n",
i,
+ Seeds[i], replayed, recorded);
failed = true;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/194054
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits