[Openmp-commits] [openmp] r343006 - [OpenMP][libomptarget] Set the frame pointer then test empty slot condition

Gheorghe-Teodor Bercea via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 25 11:48:14 PDT 2018


Author: gbercea
Date: Tue Sep 25 11:48:14 2018
New Revision: 343006

URL: http://llvm.org/viewvc/llvm-project?rev=343006&view=rev
Log:
[OpenMP][libomptarget] Set the frame pointer then test empty slot condition

Summary: NFC - just fixing a bug: the empty slot test was before the re-setting of the Stack pointer. 

Reviewers: ABataev, caomhin, Hahnfeld

Reviewed By: ABataev

Subscribers: guansong, openmp-commits

Differential Revision: https://reviews.llvm.org/D52122

Modified:
    openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu

Modified: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu?rev=343006&r1=343005&r2=343006&view=diff
==============================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu (original)
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu Tue Sep 25 11:48:14 2018
@@ -477,13 +477,13 @@ EXTERN void __kmpc_data_sharing_pop_stac
     // Pointer to next available stack.
     void *&StackP = DataSharingState.StackPtr[WID];
 
+    // Pop the frame.
+    StackP = FrameStart;
+
     // If the current slot is empty, we need to free the slot after the
     // pop.
     bool SlotEmpty = (StackP == &SlotP->Data[0]);
 
-    // Pop the frame.
-    StackP = FrameStart;
-
     if (SlotEmpty && SlotP->Prev) {
       // Before removing the slot we need to reset StackP.
       StackP = SlotP->PrevSlotStackPtr;




More information about the Openmp-commits mailing list