[Openmp-commits] [openmp] [OpenMP] Remove unnecessary check of ap (PR #83303)
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Wed Feb 28 09:33:16 PST 2024
https://github.com/jpeyton52 created https://github.com/llvm/llvm-project/pull/83303
None
>From cd3763a205fce30a709b361a80935763ce846b82 Mon Sep 17 00:00:00 2001
From: Jonathan Peyton <jonathan.l.peyton at intel.com>
Date: Tue, 27 Feb 2024 17:12:46 -0600
Subject: [PATCH] [OpenMP] Remove unnecessary check of ap
---
openmp/runtime/src/kmp_runtime.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp
index fc5e8405a415ed..c41bcafec6f626 100644
--- a/openmp/runtime/src/kmp_runtime.cpp
+++ b/openmp/runtime/src/kmp_runtime.cpp
@@ -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--;
More information about the Openmp-commits
mailing list