[Openmp-commits] [openmp] de4d701 - [OpenMP] Remove unnecessary check of ap (#83303)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 11 08:28:00 PDT 2024


Author: Jonathan Peyton
Date: 2024-03-11T10:27:53-05:00
New Revision: de4d7015d05ee3d140298207bb09c239884a71f7

URL: https://github.com/llvm/llvm-project/commit/de4d7015d05ee3d140298207bb09c239884a71f7
DIFF: https://github.com/llvm/llvm-project/commit/de4d7015d05ee3d140298207bb09c239884a71f7.diff

LOG: [OpenMP] Remove unnecessary check of ap (#83303)

Added: 
    

Modified: 
    openmp/runtime/src/kmp_runtime.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp
index ce775ff49f4d99..a60bdb968371e0 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