[Openmp-commits] [openmp] r341964 - [OPENMP]Increment iterator when the loop is continued.
Alexey Bataev via Openmp-commits
openmp-commits at lists.llvm.org
Tue Sep 11 10:16:26 PDT 2018
Author: abataev
Date: Tue Sep 11 10:16:26 2018
New Revision: 341964
URL: http://llvm.org/viewvc/llvm-project?rev=341964&view=rev
Log:
[OPENMP]Increment iterator when the loop is continued.
Summary:
Missed operation of the incrementing iterator when required just to
continue execution.
Reviewers: kkwli0, gtbercea, grokos
Subscribers: guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D51937
Modified:
openmp/trunk/libomptarget/src/omptarget.cpp
Modified: openmp/trunk/libomptarget/src/omptarget.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/omptarget.cpp?rev=341964&r1=341963&r2=341964&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/omptarget.cpp (original)
+++ openmp/trunk/libomptarget/src/omptarget.cpp Tue Sep 11 10:16:26 2018
@@ -423,8 +423,10 @@ int target_data_end(DeviceTy &Device, in
// 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;
More information about the Openmp-commits
mailing list