diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2022-07-13 11:01:54 -0500 |
---|---|---|
committer | Johannes Doerfert <johannes@jdoerfert.de> | 2022-07-21 12:28:45 -0500 |
commit | 7472b42b788e57b7b1ea255aa8670c96cc0aacd8 (patch) | |
tree | ae3d7e9ad9da86ad181d42d0c4a396f4ec7081b6 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | a42361dc1c26acae656243232e81a236ba333a8c (diff) | |
download | llvm-7472b42b788e57b7b1ea255aa8670c96cc0aacd8.zip llvm-7472b42b788e57b7b1ea255aa8670c96cc0aacd8.tar.gz llvm-7472b42b788e57b7b1ea255aa8670c96cc0aacd8.tar.bz2 |
[OpenMP] Use Undef instead of null as pointer for inactive lanes
Our conditional writes in the runtime look like this:
```
if (active)
*ptr = value;
```
In the RAII we need to assign `ptr` which comes from a lookup call.
If a thread that is not the main thread calls lookup with the intention
to write the pointer, we'll create a new thread state. As such, we need
to avoid calling lookup for inactive threads. We used to use `nullptr`
as their `ptr` value but that can cause pessimistic reasoning. We now
use `undef` instead.
Differential Revision: https://reviews.llvm.org/D130114
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions