diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-11-02 13:30:42 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-11-02 13:30:42 +0000 |
commit | 8148ea17f5b960f0cb6457b9e4906da119f3b1f8 (patch) | |
tree | d43b74949d4185b4a3b489fac8cd5a3e3e508c6b /lib | |
parent | eb2251ff651ab5e512fcf197b45c31496ad674bd (diff) | |
download | clang-8148ea17f5b960f0cb6457b9e4906da119f3b1f8.tar.gz |
[OpenMP] Extend "Avoid VLAs for reduction" optimization to VLAs as base
We can generate constant sized arrays whenever the array section has constant
length, even if the base expression itself is a VLA.
Differential Revision: https://reviews.llvm.org/D39504
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaOpenMP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp index 941ac75fa6..243c6ed5f4 100644 --- a/lib/Sema/SemaOpenMP.cpp +++ b/lib/Sema/SemaOpenMP.cpp @@ -9711,7 +9711,7 @@ static bool ActOnOMPReductionKindClause( } if ((OASE && !ConstantLengthOASE) || - (!ASE && + (!OASE && !ASE && D->getType().getNonReferenceType()->isVariablyModifiedType())) { // For arrays/array sections only: // Create pseudo array type for private copy. The size for this array will |