|
From: <sv...@va...> - 2009-04-23 20:07:30
|
Author: bart
Date: 2009-04-23 21:07:23 +0100 (Thu, 23 Apr 2009)
New Revision: 9595
Log:
Another performance optimization.
Modified:
trunk/drd/drd_bitmap.c
Modified: trunk/drd/drd_bitmap.c
===================================================================
--- trunk/drd/drd_bitmap.c 2009-04-23 19:23:09 UTC (rev 9594)
+++ trunk/drd/drd_bitmap.c 2009-04-23 20:07:23 UTC (rev 9595)
@@ -255,15 +255,14 @@
Bool DRD_(bm_has)(struct bitmap* const bm, const Addr a1, const Addr a2,
const BmAccessTypeT access_type)
{
- Addr b;
- for (b = a1; b < a2; b++)
- {
- if (! DRD_(bm_has_1)(bm, b, access_type))
- {
- return False;
- }
- }
- return True;
+#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
+ tl_assert(access_type == eLoad || access_type == eStore);
+#endif
+
+ if (access_type == eLoad)
+ return DRD_(bm_has_any_load)(bm, a1, a2);
+ else
+ return DRD_(bm_has_any_store)(bm, a1, a2);
}
Bool
|