aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2017-10-20 19:40:40 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2017-10-20 19:40:40 +0000
commitb6229be46046d4e0cf3b8e37165a68cab1db0090 (patch)
tree7038ae8abeaa63e0f361a49912b6710f904c869b /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent64e5d7d3ae3d138709bca57a972bce4803982b70 (diff)
downloadllvm-b6229be46046d4e0cf3b8e37165a68cab1db0090.zip
llvm-b6229be46046d4e0cf3b8e37165a68cab1db0090.tar.gz
llvm-b6229be46046d4e0cf3b8e37165a68cab1db0090.tar.bz2
[OpenMP] Avoid VLAs for some reductions on array sections
In some cases the compiler can deduce the length of an array section as constants. With this information, VLAs can be avoided in place of a constant sized array or even a scalar value if the length is 1. Example: int a[4], b[2]; pragma omp parallel reduction(+: a[1:2], b[1:1]) { } For chained array sections, this optimization is restricted to cases where all array sections except the last have a constant length 1. This trivially guarantees that there are no holes in the memory region that needs to be privatized. Example: int c[3][4]; pragma omp parallel reduction(+: c[1:1][1:2]) { } Differential Revision: https://reviews.llvm.org/D39136 llvm-svn: 316229
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions