[all-commits] [llvm/llvm-project] bfb773: [OpenMP] Fix accidental reuse of VLA size
Roger Ferrer Ibáñez via All-commits
all-commits at lists.llvm.org
Fri Aug 6 22:59:37 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bfb77364d0be8a5b159cdcf4eaf8e7a720802e89
https://github.com/llvm/llvm-project/commit/bfb77364d0be8a5b159cdcf4eaf8e7a720802e89
Author: Roger Ferrer Ibanez <roger.ferrer at bsc.es>
Date: 2021-08-07 (Sat, 07 Aug 2021)
Changed paths:
M clang/lib/CodeGen/CGOpenMPRuntime.cpp
A clang/test/OpenMP/vla_iterator_cache_bug.c
Log Message:
-----------
[OpenMP] Fix accidental reuse of VLA size
We were using an OpaqueValueExpr allocated on the stack to store
the size of a VLA. Because the VLASizeMap in CodegenFunction
uses the address of the expression to avoid recomputing VLAs,
we were accidentally reusing an earlier llvm::Value. This led to
invalid LLVM IR.
This is a temporary solution until VLASizeMap can be pushed and popped
based on the context.
Differential Revision: https://reviews.llvm.org/D107666
More information about the All-commits
mailing list