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,h --
openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_mixed_capture.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type_recursive.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer_recursive_frameid.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_recursive.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_works.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_1.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
clang/lib/CodeGen/CGOpenMPRuntime.cpp openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_tasking.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/clang/lib/CodeGen/CGOpenMPRuntime.cpp
b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 9f342038f..d1c8f24e7 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -4981,10 +4981,9 @@ void CGOpenMPRuntime::emitTaskCall(
const auto *CS = cast<CapturedStmt>(D.getAssociatedStmt());
llvm::Function *RelocFn =
emitTaskRelocationFunction(CGM, Loc, *CS, CGF.CapturedStmtInfo, Data);
- TGTaskArgs[8] = RelocFn
- ? CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
- RelocFn, CGM.VoidPtrTy)
- : llvm::ConstantPointerNull::get(CGF.VoidPtrTy);
+ TGTaskArgs[8] = RelocFn ? CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
+ RelocFn, CGM.VoidPtrTy)
+ : llvm::ConstantPointerNull::get(CGF.VoidPtrTy);
CGF.EmitRuntimeCall(OMPBuilder.getOrCreateRuntimeFunction(
CGM.getModule(), OMPRTL___kmpc_taskgraph_task),
TGTaskArgs);
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index befca1278..9a96121d9 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -4510,8 +4510,8 @@ KMP_EXPORT void __kmpc_taskgraph(ident_t *loc_ref,
kmp_int32 gtid,
void *args);
KMP_EXPORT kmp_uint32 __kmpc_taskgraph_task(
ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 flags,
- size_t sizeof_kmp_task_t, size_t sizeof_shareds,
- kmp_int32 ndeps, kmp_depend_info_t *dep_list, kmp_task_relocate_t reloc);
+ size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_int32 ndeps,
+ kmp_depend_info_t *dep_list, kmp_task_relocate_t reloc);
KMP_EXPORT kmp_uint32 __kmpc_taskgraph_taskloop(
ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 flags,
size_t sizeof_kmp_task_t, void *shareds, size_t sizeof_shareds,
diff --git a/openmp/runtime/src/kmp_tasking.cpp
b/openmp/runtime/src/kmp_tasking.cpp
index d595c555a..1b35a56f7 100644
--- a/openmp/runtime/src/kmp_tasking.cpp
+++ b/openmp/runtime/src/kmp_tasking.cpp
@@ -2380,10 +2380,10 @@ static void __kmp_omp_tg_task(kmp_int32 gtid,
kmp_taskgraph_node_t *node,
KMP_ATOMIC_INC(&parent_taskdata->td_allocated_child_tasks);
if (node->relocate) {
- // Call the task's relocation function with the incoming args from the
owning
- // taskgraph. This rewrites capture-by-reference variables to point to the
- // correct location on the replayed taskgraph's stack (which may not be the
- // same as the location from the initial recorded taskgraph).
+ // Call the task's relocation function with the incoming args from the
+ // owning taskgraph. This rewrites capture-by-reference variables to point
+ // to the correct location on the replayed taskgraph's stack (which may not
+ // be the same as the location from the initial recorded taskgraph).
node->relocate(task, taskdata->owning_taskgraph->taskgraph_args);
} else if (task->shareds != NULL) {
// A missing relocation callback is only fatal when there is a non-empty
@@ -5878,7 +5878,7 @@ static kmp_task_t *__kmp_taskgraph_clone_task(kmp_info_t
*thread,
kmp_task_t *copy_task = KMP_TASKDATA_TO_TASK(copy_td);
if (orig->shareds) {
// New task's shared data has now moved. Update the pointer.
- copy_task->shareds = (void*) ((char*) copy_td + shareds_offset);
+ copy_task->shareds = (void *)((char *)copy_td + shareds_offset);
}
KMP_ATOMIC_ST_RLX(©_td->td_incomplete_child_tasks, 0);
return KMP_TASKDATA_TO_TASK(copy_td);
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
b/openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
index c3dad7cf1..e3f8976bc 100644
--- a/openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
+++ b/openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
@@ -8,8 +8,8 @@
static volatile int StackSink = 0;
// Keep the observable result in stable storage so this test isolates
// firstprivate replay across different stack depths. There is a separate bug
-// test for replayed tasks writing through a stack-local shared pointer cached
at
-// record time.
+// test for replayed tasks writing through a stack-local shared pointer cached
+// at record time.
static volatile int ReplayResult = -1;
struct Payload {
@@ -34,15 +34,17 @@ __attribute__((noinline)) static void clobber_stack(int
base) {
}
__attribute__((noinline)) static int run_taskgraph(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
ReplayResult = -1;
#pragma omp taskgraph graph_id(91)
{
#pragma omp task firstprivate(payload, seed) shared(ReplayResult)
- { ReplayResult = evaluate_payload(payload, seed); }
+ {
+ ReplayResult = evaluate_payload(payload, seed);
+ }
}
return ReplayResult;
@@ -62,9 +64,9 @@ __attribute__((noinline)) static int call_with_depth(int
seed, int depth) {
}
__attribute__((noinline)) static int expected_result(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
return evaluate_payload(payload, seed);
}
@@ -82,8 +84,7 @@ int main() {
{
recorded = call_with_depth(Seeds[0], Depths[0]);
if (recorded != expected_result(Seeds[0])) {
- std::fprintf(stderr,
- "FAIL initial record got=%d expected=%d\n",
+ std::fprintf(stderr, "FAIL initial record got=%d expected=%d\n",
recorded, expected_result(Seeds[0]));
failed = true;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_mixed_capture.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_mixed_capture.cpp
index 8668fbf1f..0ea8e4bda 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_mixed_capture.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_mixed_capture.cpp
@@ -14,7 +14,8 @@ __attribute__((noinline)) static int
run_taskgraph_mixed_capture(int seed) {
#pragma omp taskgraph graph_id(401)
{
-#pragma omp task replayable(1) shared(x, y, out) firstprivate(fp) depend(inout
: x, y)
+#pragma omp task replayable(1) shared(x, y, out) firstprivate(fp)
\
+ depend(inout : x, y)
{
x += fp;
y += x;
@@ -31,7 +32,8 @@ int main() {
if (first != 17 || second != 314) {
std::fprintf(stderr,
- "FAIL lexical mixed capture replay first=%d second=%d
expected=17/314\n",
+ "FAIL lexical mixed capture replay first=%d second=%d "
+ "expected=17/314\n",
first, second);
return 1;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type.cpp
index 1d071fd24..f3a50a271 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type.cpp
@@ -43,15 +43,17 @@ int main() {
if (first != 12 || second != 111 || Tracker::Ctors < 2 ||
Tracker::Dtors < 2 || Tracker::Ctors != Tracker::Dtors) {
- std::fprintf(stderr,
- "FAIL lexical nontrivial replay first=%d second=%d ctors=%d
dtors=%d\n",
- first, second, Tracker::Ctors, Tracker::Dtors);
+ std::fprintf(
+ stderr,
+ "FAIL lexical nontrivial replay first=%d second=%d ctors=%d
dtors=%d\n",
+ first, second, Tracker::Ctors, Tracker::Dtors);
return 1;
}
- std::fprintf(stderr,
- "PASS lexical nontrivial replay first=%d second=%d ctors=%d
dtors=%d\n",
- first, second, Tracker::Ctors, Tracker::Dtors);
+ std::fprintf(
+ stderr,
+ "PASS lexical nontrivial replay first=%d second=%d ctors=%d dtors=%d\n",
+ first, second, Tracker::Ctors, Tracker::Dtors);
return 0;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type_recursive.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type_recursive.cpp
index 1f9ec111b..6012b6194 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type_recursive.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_nontrivial_type_recursive.cpp
@@ -29,8 +29,8 @@ __attribute__((noinline)) static int expected_recursive(int
depth, int seed,
return local + expected_recursive(depth - 1, seed + 9, run_tag);
}
-__attribute__((noinline)) static int run_recursive_nontrivial(int depth, int
seed,
- int run_tag) {
+__attribute__((noinline)) static int
+run_recursive_nontrivial(int depth, int seed, int run_tag) {
Tracker Obj(seed);
int out = -1;
@@ -72,14 +72,16 @@ int main() {
if (Tracker::Ctors != Tracker::Dtors || Tracker::Ctors < 12) {
std::fprintf(stderr,
- "FAIL recursive nontrivial lifetime ctors=%d dtors=%d
total=%d expected=%d\n",
+ "FAIL recursive nontrivial lifetime ctors=%d dtors=%d "
+ "total=%d expected=%d\n",
Tracker::Ctors, Tracker::Dtors, total_actual, total_expected);
return 1;
}
- std::fprintf(stderr,
- "PASS recursive nontrivial total=%d expected=%d ctors=%d
dtors=%d\n",
- total_actual, total_expected, Tracker::Ctors, Tracker::Dtors);
+ std::fprintf(
+ stderr,
+ "PASS recursive nontrivial total=%d expected=%d ctors=%d dtors=%d\n",
+ total_actual, total_expected, Tracker::Ctors, Tracker::Dtors);
return 0;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer.cpp
index 1dda07c2d..7690aff37 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer.cpp
@@ -29,13 +29,15 @@ int main() {
if (first != 4 || second != 103) {
std::fprintf(stderr,
- "FAIL lexical pointer shared replay first=%d second=%d
expected=4/103\n",
+ "FAIL lexical pointer shared replay first=%d second=%d "
+ "expected=4/103\n",
first, second);
return 1;
}
- std::fprintf(stderr, "PASS lexical pointer shared replay first=%d
second=%d\n",
- first, second);
+ std::fprintf(stderr,
+ "PASS lexical pointer shared replay first=%d second=%d\n",
first,
+ second);
return 0;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer_recursive_frameid.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer_recursive_frameid.cpp
index a8f0642e4..142a5941f 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer_recursive_frameid.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_pointer_recursive_frameid.cpp
@@ -57,9 +57,10 @@ int main() {
int actual = run_recursive_frameid(depth, seed, run);
int expected = expected_recursive(depth, seed, run);
if (actual != expected) {
- std::fprintf(stderr,
- "FAIL recursive pointer frameid run=%d actual=%d
expected=%d\n",
- run, actual, expected);
+ std::fprintf(
+ stderr,
+ "FAIL recursive pointer frameid run=%d actual=%d expected=%d\n", run,
+ actual, expected);
return 1;
}
actual_sum += actual;
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_recursive.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_recursive.cpp
index c87aaff83..4d0d7b561 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_recursive.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_recursive.cpp
@@ -6,7 +6,8 @@
#include <cstdio>
-__attribute__((noinline)) static int run_taskgraph_recursive(int depth, int
seed) {
+__attribute__((noinline)) static int run_taskgraph_recursive(int depth,
+ int seed) {
int x = seed;
int out = -1;
@@ -30,9 +31,10 @@ int main() {
const int second = run_taskgraph_recursive(3, 100);
if (first != 74 || second != 470) {
- std::fprintf(stderr,
- "FAIL lexical recursive replay first=%d second=%d
expected=74/470\n",
- first, second);
+ std::fprintf(
+ stderr,
+ "FAIL lexical recursive replay first=%d second=%d expected=74/470\n",
+ first, second);
return 1;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_works.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_works.cpp
index 51528905c..82be9c82d 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_works.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_lexical_shared_works.cpp
@@ -27,14 +27,15 @@ int main() {
const int second = run_taskgraph_lexical(100);
if (first != 6 || second != 105) {
- std::fprintf(stderr,
- "FAIL lexical shared replay first=%d second=%d
expected=6/105\n",
- first, second);
+ std::fprintf(
+ stderr,
+ "FAIL lexical shared replay first=%d second=%d expected=6/105\n",
first,
+ second);
return 1;
}
- std::fprintf(stderr, "PASS lexical shared replay first=%d second=%d\n",
- first, second);
+ std::fprintf(stderr, "PASS lexical shared replay first=%d second=%d\n",
first,
+ second);
return 0;
}
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_1.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_1.cpp
index a208c598f..671e3bf76 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_1.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_1.cpp
@@ -21,7 +21,9 @@ __attribute__((noinline)) static int
run_taskgraph_nonlexical(int seed) {
int out = -1;
#pragma omp taskgraph graph_id(312)
- { emit_nonlexical_task(x, out); }
+ {
+ emit_nonlexical_task(x, out);
+ }
return out;
}
@@ -33,8 +35,10 @@ int main() {
// The "non-lexical" replayable task is emitted in a helper function outside
// the taskgraph lexical scope. We expect this to raise a runtime error.
if (recorded == replayed) {
- std::fprintf(stderr, "UNEXPECTED SUCCESS nonlexical replay recorded=%d
replayed=%d\n",
- recorded, replayed);
+ std::fprintf(
+ stderr,
+ "UNEXPECTED SUCCESS nonlexical replay recorded=%d replayed=%d\n",
+ recorded, replayed);
return 0;
}
@@ -44,4 +48,5 @@ int main() {
return 1;
}
-// CHECK: OMP: Error #302: Cannot locate captured shared variable reference
for taskgraph replay
+// CHECK: OMP: Error #302: Cannot locate captured shared variable reference for
+// taskgraph replay
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
index 8ab601913..705114d19 100644
---
a/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
+++
b/openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
@@ -10,13 +10,13 @@ __attribute__((noinline)) static int
emit_nonlexical_task(int seed) {
int x = seed;
int out = -1;
- // This is syntactically valid, but a taskgraph replay that includes this
- // task cannot possibly succeed, because the stack frame containing 'x' and
- // 'out' doesn't exist at replay time. We can raise a runtime error in that
- // case.
- // This isn't a compile error because the code is still valid if no taskgraph
- // record/replay is in progress.
- #pragma omp task replayable(1) shared(x, out) depend(inout : x)
+// This is syntactically valid, but a taskgraph replay that includes this
+// task cannot possibly succeed, because the stack frame containing 'x' and
+// 'out' doesn't exist at replay time. We can raise a runtime error in that
+// case.
+// This isn't a compile error because the code is still valid if no taskgraph
+// record/replay is in progress.
+#pragma omp task replayable(1) shared(x, out) depend(inout : x)
{
x += 5;
out = x;
@@ -42,7 +42,8 @@ __attribute__((noinline)) static int
run_taskgraph_nonlexical(int seed) {
int main() {
int out = emit_nonlexical_task(50);
if (out != 55) {
- std::fprintf(stderr, "UNEXPECTED FAILURE: task outside taskgraph returned
%d\n",
+ std::fprintf(stderr,
+ "UNEXPECTED FAILURE: task outside taskgraph returned %d\n",
out);
}
@@ -52,8 +53,10 @@ int main() {
// The non-lexical replayable task is emitted in a helper function outside
// the taskgraph lexical scope.
if (recorded == replayed) {
- std::fprintf(stderr, "UNEXPECTED SUCCESS nonlexical replay recorded=%d
replayed=%d\n",
- recorded, replayed);
+ std::fprintf(
+ stderr,
+ "UNEXPECTED SUCCESS nonlexical replay recorded=%d replayed=%d\n",
+ recorded, replayed);
return 0;
}
@@ -63,4 +66,5 @@ int main() {
return 1;
}
-// CHECK: OMP: Error #302: Cannot locate captured shared variable reference
for taskgraph replay
+// CHECK: OMP: Error #302: Cannot locate captured shared variable reference for
+// taskgraph replay
diff --git
a/openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
b/openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
index ff70dd3c6..922cb85a5 100644
--- a/openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
+++ b/openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
@@ -35,19 +35,24 @@ __attribute__((noinline)) static void clobber_stack(int
base) {
// helper function called inside the taskgraph region, and needs closure-like
// capture of that helper's stack locals.
__attribute__((noinline)) static void emit_replayable_task(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
-#pragma omp task replayable(1) firstprivate(saved : payload, seed)
shared(ReplayResult)
- { ReplayResult = evaluate_payload(payload, seed); }
+#pragma omp task replayable(1) firstprivate(saved : payload, seed)
\
+ shared(ReplayResult)
+ {
+ ReplayResult = evaluate_payload(payload, seed);
+ }
}
__attribute__((noinline)) static int run_taskgraph(int seed) {
ReplayResult = -1;
#pragma omp taskgraph graph_id(93)
- { emit_replayable_task(seed); }
+ {
+ emit_replayable_task(seed);
+ }
return ReplayResult;
}
@@ -66,9 +71,9 @@ __attribute__((noinline)) static int call_with_depth(int
seed, int depth) {
}
__attribute__((noinline)) static int expected_result(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
return evaluate_payload(payload, seed);
}
@@ -86,8 +91,7 @@ int main() {
{
recorded = call_with_depth(Seeds[0], Depths[0]);
if (recorded != expected_result(Seeds[0])) {
- std::fprintf(stderr,
- "FAIL initial record got=%d expected=%d\n",
+ std::fprintf(stderr, "FAIL initial record got=%d expected=%d\n",
recorded, expected_result(Seeds[0]));
failed = true;
}
diff --git a/openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
b/openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
index ae105eb23..ad579e8ed 100644
--- a/openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
+++ b/openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
@@ -31,15 +31,17 @@ __attribute__((noinline)) static void clobber_stack(int
base) {
}
__attribute__((noinline)) static int run_taskgraph(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
int result = -1;
#pragma omp taskgraph graph_id(92)
{
#pragma omp task firstprivate(payload, seed) shared(result)
- { result = evaluate_payload(payload, seed); }
+ {
+ result = evaluate_payload(payload, seed);
+ }
}
return result;
@@ -59,9 +61,9 @@ __attribute__((noinline)) static int call_with_depth(int
seed, int depth) {
}
__attribute__((noinline)) static int expected_result(int seed) {
- Payload payload{{seed + 1, seed + 3, seed + 5, seed + 7, seed + 11,
- seed + 13},
- seed * 17 + 19};
+ Payload payload{
+ {seed + 1, seed + 3, seed + 5, seed + 7, seed + 11, seed + 13},
+ seed * 17 + 19};
return evaluate_payload(payload, seed);
}
@@ -79,14 +81,13 @@ int main() {
clobber_stack(ReplaySeed * 1000);
const int replayed = call_with_depth(ReplaySeed, 3);
if (replayed != recorded) {
- std::fprintf(stderr,
- "BUG shared stack replay depth=%d seed=%d got=%d
expected=%d\n",
- 3, ReplaySeed, replayed, recorded);
+ std::fprintf(
+ stderr, "BUG shared stack replay depth=%d seed=%d got=%d
expected=%d\n",
+ 3, ReplaySeed, replayed, recorded);
return 1;
}
- std::fprintf(stderr, "PASS shared stack replay=%d\n",
- replayed);
+ std::fprintf(stderr, "PASS shared stack replay=%d\n", replayed);
return 0;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/200404
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits