[all-commits] [llvm/llvm-project] eaab94: [OpenMP] Use simple VLA implementation to replace ...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Nov 28 15:30:20 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eaab947a8aa39002e8bdaa82be08cbc31e116a11
https://github.com/llvm/llvm-project/commit/eaab947a8aa39002e8bdaa82be08cbc31e116a11
Author: Shilei Tian <i at tianshilei.me>
Date: 2023-11-28 (Tue, 28 Nov 2023)
Changed paths:
M openmp/runtime/src/kmp_gsupport.cpp
M openmp/runtime/src/kmp_runtime.cpp
A openmp/runtime/src/kmp_utils.h
Log Message:
-----------
[OpenMP] Use simple VLA implementation to replace uses of actual VLA (#71412)
Use of VLA can cause compile warning that was introduced in D156565.
This patch
implements a simple stack/heap-based VLA that can miminc the behavior of
an
actual VLA and prevent the warning. By default the stack accomodates the
elements. If the number of emelements is greater than N, which by
default is 8,
a heap buffer will be allocated and used to acccomodate the elements.
More information about the All-commits
mailing list