diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2022-05-05 12:24:43 -0400 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2022-06-06 12:58:23 -0400 |
commit | b8f6f9e741c60a06cbe14adf890db0889b3b333f (patch) | |
tree | 5b2af47dd06dd4352f91a81b26307b035eace9ac /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 04d4130a513783eecbec426c8151c1d2fe086430 (diff) | |
download | llvm-b8f6f9e741c60a06cbe14adf890db0889b3b333f.zip llvm-b8f6f9e741c60a06cbe14adf890db0889b3b333f.tar.gz llvm-b8f6f9e741c60a06cbe14adf890db0889b3b333f.tar.bz2 |
[libc++] Avoid creating temporaries in unary expressions involving valarray
Currently, unary expressions involving valarray will create a temporary.
This leads to dangling references in expressions like `-a * b`, because
`-a` is a temporary and the resulting expression will refer to it. This
patch fixes the problem by creating a lazy expression to perform the unary
operation instead of eagerly creating a temporary valarray. This is
permitted by the Standard, which does not specify the exact type of
most expressions involving valarrays.
This is technically an ABI break, however I believe the actual potential
for breakage is very low.
rdar://90152242
Differential Revision: https://reviews.llvm.org/D125019
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions