commit | 4abd359e3400e614324f386d73275b9ef8f2182c | [log] [tgz] |
---|---|---|
author | Johannes Doerfert <johannes@jdoerfert.de> | Sat Oct 30 14:24:25 2021 -0500 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Nov 02 21:25:40 2021 -0700 |
tree | c20193d7ca3206dd4748ec34811707882a33c5bf | |
parent | abd24261f149cd3ce6a1de8abec72af69a3c8713 [diff] |
[OpenMP][FIX] Avoid a race between initialization and first state reads When we pick state 0 to initialize state but thread N is going to be the "main thread", in generic mode, we would require extra synchronization. Instead, we should pick the main thread to initialize state in generic mode and any thread in SPMD mode. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D112874 GitOrigin-RevId: ccb5d2726a8bc0092857f9e69963e872d78cd4d8