|
From: <sv...@va...> - 2008-11-20 23:33:12
|
Author: sewardj
Date: 2008-11-20 23:33:05 +0000 (Thu, 20 Nov 2008)
New Revision: 8795
Log:
Helgrind's event-map garbage collector hammers VG_(OSetGen_Next).
Import an optimisation from the analogous function in m_wordfm.c.
Modified:
trunk/coregrind/m_oset.c
Modified: trunk/coregrind/m_oset.c
===================================================================
--- trunk/coregrind/m_oset.c 2008-11-20 23:17:01 UTC (rev 8794)
+++ trunk/coregrind/m_oset.c 2008-11-20 23:33:05 UTC (rev 8795)
@@ -751,15 +751,17 @@
// keeping this loop in this simpler form.
while (stackPop(t, &n, &i)) {
switch (i) {
- case 1:
+ case 1: case_1:
stackPush(t, n, 2);
- if (n->left) stackPush(t, n->left, 1);
+ /* if (n->left) stackPush(t, n->left, 1); */
+ if (n->left) { n = n->left; goto case_1; }
break;
case 2:
stackPush(t, n, 3);
return elem_of_node(n);
case 3:
- if (n->right) stackPush(t, n->right, 1);
+ /* if (n->right) stackPush(t, n->right, 1); */
+ if (n->right) { n = n->right; goto case_1; }
break;
}
}
|