Allow a WordFM iterator to be initialised so as to exclude all key
values below a given value. This allows efficiently iterating over
small subsets of a mapping. Use this in Helgrind to avoid a
performance bad case. Patch from Konstantin Serebryany.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7353 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_wordfm.h b/helgrind/hg_wordfm.h
index cd8f542..7ad520d 100644
--- a/helgrind/hg_wordfm.h
+++ b/helgrind/hg_wordfm.h
@@ -87,8 +87,13 @@
// set up FM for iteration
void HG_(initIterFM) ( WordFM* fm );
+// set up FM for iteration
+// so that the first key subsequently produced by HG_(nextIterFM) is
+// the smallest key in the map >= start_at.
+void HG_(initIterAtFM) ( WordFM* fm, Word start_at );
+
// get next key/val pair. Will assert if fm has been modified
-// or looked up in since initIterFM was called.
+// or looked up in since initIterFM/initIterWithStartFM was called.
Bool HG_(nextIterFM) ( WordFM* fm,
/*OUT*/Word* pKey, /*OUT*/Word* pVal );