Skip to content

Commit e7f5d60

Browse files
committed
Revert "[OpenMP] Use simple VLA implementation to replace uses of actual VLA (#71412)"
This reverts commit eaab947 because it causes link error.
1 parent 4701f77 commit e7f5d60

File tree

3 files changed

+4
-58
lines changed

3 files changed

+4
-58
lines changed

openmp/runtime/src/kmp_gsupport.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "kmp.h"
1414
#include "kmp_atomic.h"
15-
#include "kmp_utils.h"
1615

1716
#if OMPT_SUPPORT
1817
#include "ompt-specific.h"
@@ -1281,7 +1280,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
12811280
KMP_ASSERT(depend);
12821281
kmp_gomp_depends_info_t gomp_depends(depend);
12831282
kmp_int32 ndeps = gomp_depends.get_num_deps();
1284-
SimpleVLA<kmp_depend_info_t> dep_list(ndeps);
1283+
kmp_depend_info_t dep_list[ndeps];
12851284
for (kmp_int32 i = 0; i < ndeps; i++)
12861285
dep_list[i] = gomp_depends.get_kmp_depend(i);
12871286
kmp_int32 ndeps_cnv;
@@ -1310,7 +1309,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
13101309
KMP_ASSERT(depend);
13111310
kmp_gomp_depends_info_t gomp_depends(depend);
13121311
kmp_int32 ndeps = gomp_depends.get_num_deps();
1313-
SimpleVLA<kmp_depend_info_t> dep_list(ndeps);
1312+
kmp_depend_info_t dep_list[ndeps];
13141313
for (kmp_int32 i = 0; i < ndeps; i++)
13151314
dep_list[i] = gomp_depends.get_kmp_depend(i);
13161315
__kmpc_omp_wait_deps(&loc, gtid, ndeps, dep_list, 0, NULL);
@@ -1994,7 +1993,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKWAIT_DEPEND)(void **depend) {
19941993
KA_TRACE(20, ("GOMP_taskwait_depend: T#%d\n", gtid));
19951994
kmp_gomp_depends_info_t gomp_depends(depend);
19961995
kmp_int32 ndeps = gomp_depends.get_num_deps();
1997-
SimpleVLA<kmp_depend_info_t> dep_list(ndeps);
1996+
kmp_depend_info_t dep_list[ndeps];
19981997
for (kmp_int32 i = 0; i < ndeps; i++)
19991998
dep_list[i] = gomp_depends.get_kmp_depend(i);
20001999
#if OMPT_SUPPORT

openmp/runtime/src/kmp_runtime.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "kmp_wait_release.h"
2525
#include "kmp_wrapper_getpid.h"
2626
#include "kmp_dispatch.h"
27-
#include "kmp_utils.h"
2827
#if KMP_USE_HIER_SCHED
2928
#include "kmp_dispatch_hier.h"
3029
#endif
@@ -1653,7 +1652,7 @@ __kmp_serial_fork_call(ident_t *loc, int gtid, enum fork_context_e call_context,
16531652
/* josh todo: hypothetical question: what do we do for OS X*? */
16541653
#if KMP_OS_LINUX && \
16551654
(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
1656-
SimpleVLA<void *> args(argc);
1655+
void *args[argc];
16571656
#else
16581657
void **args = (void **)KMP_ALLOCA(argc * sizeof(void *));
16591658
#endif /* KMP_OS_LINUX && ( KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || \

openmp/runtime/src/kmp_utils.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)