ABataev added inline comments.
================ Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:389 unsigned WID = getWarpId(); + // void * volatile FramePointer = 0; void *&FrameP = DataSharingState.FramePtr[WID]; ---------------- This must be removed ================ Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:438 + // point to the start of the new frame held in StackP. + //atomicExch((unsigned long long *)&FrameP, (unsigned long long)StackP); + FrameP = StackP; ---------------- Also, must be removed ================ Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:444 + } + } while (!FrameP); ---------------- It is a very bad idea to have something like this without atomic instructions. Also, for writing, you need to use atomic instructions (+, possibly, `volatile` data type). Otherwise, it leads to undefined behavior and problems during optimization. Repository: rOMP OpenMP https://reviews.llvm.org/D53141 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits