[flang][OpenMP] Fix firstprivate with barrier
This patch fixes the unintentional data race in firstprivate implementation. There is a Read-Write race when one thread tries to copy the value inside the omp.parallel region while other thread modifies it from inside the region (using pointers or some other form of indirect access). For detailed discussion please refer to [[ https://discourse.llvm.org/t/issues-with-the-current-implementation-of-privatization-in-openmp-with-fortran/62335 | discourse ]]. Reviewed By: kiranchandramohan, peixin, NimishMishra Differential Revision: https://reviews.llvm.org/D125689
Loading
Please sign in to comment