[all-commits] [llvm/llvm-project] 97e16d: [OpenMP] Use simple VLA implementation to replace ...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Nov 28 16:05:01 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97e16da450e94c92456fa5a74768ec1b22fe6b63
https://github.com/llvm/llvm-project/commit/97e16da450e94c92456fa5a74768ec1b22fe6b63
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
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