Skip to content

Commit

Permalink
[OpenMP] Remove unnecessary check of ap (llvm#83303)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeyton52 authored Mar 11, 2024
1 parent 1ed463d commit de4d701
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions openmp/runtime/src/kmp_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1743,14 +1743,8 @@ __kmp_serial_fork_call(ident_t *loc, int gtid, enum fork_context_e call_context,
__kmp_alloc_argv_entries(argc, team, TRUE);
team->t.t_argc = argc;
argv = (void **)team->t.t_argv;
if (ap) {
for (i = argc - 1; i >= 0; --i)
*argv++ = va_arg(kmp_va_deref(ap), void *);
} else {
for (i = 0; i < argc; ++i)
// Get args from parent team for teams construct
argv[i] = parent_team->t.t_argv[i];
}
for (i = argc - 1; i >= 0; --i)
*argv++ = va_arg(kmp_va_deref(ap), void *);
// AC: revert change made in __kmpc_serialized_parallel()
// because initial code in teams should have level=0
team->t.t_level--;
Expand Down

0 comments on commit de4d701

Please sign in to comment.