[Openmp-commits] [PATCH] D51937: [OPENMP]Increment iterator when the loop is continued.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 11 09:47:24 PDT 2018


ABataev created this revision.
ABataev added reviewers: kkwli0, gtbercea, grokos.
Herald added a subscriber: guansong.

Missed operation of the incrementing iterator when required just to
continue execution.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D51937

Files:
  libomptarget/src/omptarget.cpp


Index: libomptarget/src/omptarget.cpp
===================================================================
--- libomptarget/src/omptarget.cpp
+++ libomptarget/src/omptarget.cpp
@@ -423,8 +423,10 @@
 
         // An STL map is sorted on its keys; use this property
         // to quickly determine when to break out of the loop.
-        if ((uintptr_t) ShadowHstPtrAddr < lb)
+        if ((uintptr_t) ShadowHstPtrAddr < lb) {
+          ++it;
           continue;
+        }
         if ((uintptr_t) ShadowHstPtrAddr >= ub)
           break;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51937.164914.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180911/01278d41/attachment.bin>


More information about the Openmp-commits mailing list