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