diff options
author | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2018-09-25 18:48:14 +0000 |
---|---|---|
committer | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2018-09-25 18:48:14 +0000 |
commit | f7256a593f8534c003482e322bc4cee1f2f6b2ce (patch) | |
tree | a6413a42626acd0532f6c3b6d76e308681631372 | |
parent | e02de05b3275f20fbf85da32f676d6f54ba73746 (diff) | |
download | bcm5719-llvm-f7256a593f8534c003482e322bc4cee1f2f6b2ce.tar.gz bcm5719-llvm-f7256a593f8534c003482e322bc4cee1f2f6b2ce.zip |
[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
llvm-svn: 343006
-rw-r--r-- | openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu index 6e1548b703d..2125c36e1d8 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu @@ -477,13 +477,13 @@ EXTERN void __kmpc_data_sharing_pop_stack(void *FrameStart) { // 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; |