Lines Matching refs:bm
71 struct bitmap* bm; in DRD_() local
77 bm = VG_(malloc)("drd.bitmap.bn.1", sizeof(*bm)); in DRD_()
78 DRD_(bm_init)(bm); in DRD_()
80 return bm; in DRD_()
83 void DRD_(bm_delete)(struct bitmap* const bm) in DRD_()
85 tl_assert(bm); in DRD_()
87 DRD_(bm_cleanup)(bm); in DRD_()
88 VG_(free)(bm); in DRD_()
92 void DRD_(bm_init)(struct bitmap* const bm) in DRD_()
96 tl_assert(bm); in DRD_()
104 bm->cache[i].a1 = ~(UWord)1; in DRD_()
105 bm->cache[i].bm2 = 0; in DRD_()
107 bm->oset = VG_(OSetGen_EmptyClone)(s_bm2_set_template); in DRD_()
113 void DRD_(bm_cleanup)(struct bitmap* const bm) in DRD_()
115 VG_(OSetGen_Destroy)(bm->oset); in DRD_()
127 void DRD_(bm_access_range)(struct bitmap* const bm, in DRD_()
134 return DRD_(bm_access_range_load)(bm, a1, a2); in DRD_()
136 return DRD_(bm_access_range_store)(bm, a1, a2); in DRD_()
139 void DRD_(bm_access_range_load)(struct bitmap* const bm, Addr a1, Addr a2) in DRD_()
143 tl_assert(bm); in DRD_()
162 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(b)); in DRD_()
201 void DRD_(bm_access_load_1)(struct bitmap* const bm, const Addr a1) in DRD_()
203 bm_access_aligned_load(bm, a1, 1); in DRD_()
206 void DRD_(bm_access_load_2)(struct bitmap* const bm, const Addr a1) in DRD_()
209 bm_access_aligned_load(bm, a1, 2); in DRD_()
211 DRD_(bm_access_range)(bm, a1, a1 + 2, eLoad); in DRD_()
214 void DRD_(bm_access_load_4)(struct bitmap* const bm, const Addr a1) in DRD_()
217 bm_access_aligned_load(bm, a1, 4); in DRD_()
219 DRD_(bm_access_range)(bm, a1, a1 + 4, eLoad); in DRD_()
222 void DRD_(bm_access_load_8)(struct bitmap* const bm, const Addr a1) in DRD_()
225 bm_access_aligned_load(bm, a1, 8); in DRD_()
228 bm_access_aligned_load(bm, a1 + 0, 4); in DRD_()
229 bm_access_aligned_load(bm, a1 + 4, 4); in DRD_()
232 DRD_(bm_access_range)(bm, a1, a1 + 8, eLoad); in DRD_()
235 void DRD_(bm_access_range_store)(struct bitmap* const bm, in DRD_()
240 tl_assert(bm); in DRD_()
259 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(b)); in DRD_()
298 void DRD_(bm_access_store_1)(struct bitmap* const bm, const Addr a1) in DRD_()
300 bm_access_aligned_store(bm, a1, 1); in DRD_()
303 void DRD_(bm_access_store_2)(struct bitmap* const bm, const Addr a1) in DRD_()
306 bm_access_aligned_store(bm, a1, 2); in DRD_()
308 DRD_(bm_access_range)(bm, a1, a1 + 2, eStore); in DRD_()
311 void DRD_(bm_access_store_4)(struct bitmap* const bm, const Addr a1) in DRD_()
314 bm_access_aligned_store(bm, a1, 4); in DRD_()
316 DRD_(bm_access_range)(bm, a1, a1 + 4, eStore); in DRD_()
319 void DRD_(bm_access_store_8)(struct bitmap* const bm, const Addr a1) in DRD_()
322 bm_access_aligned_store(bm, a1, 8); in DRD_()
325 bm_access_aligned_store(bm, a1 + 0, 4); in DRD_()
326 bm_access_aligned_store(bm, a1 + 4, 4); in DRD_()
329 DRD_(bm_access_range)(bm, a1, a1 + 8, eStore); in DRD_()
332 Bool DRD_(bm_has)(struct bitmap* const bm, const Addr a1, const Addr a2, in DRD_()
338 return DRD_(bm_has_any_load)(bm, a1, a2); in DRD_()
340 return DRD_(bm_has_any_store)(bm, a1, a2); in DRD_()
343 Bool DRD_(bm_has_any_load_g)(struct bitmap* const bm) in DRD_()
347 tl_assert(bm); in DRD_()
349 VG_(OSetGen_ResetIter)(bm->oset); in DRD_()
350 for ( ; (bm2 = VG_(OSetGen_Next)(bm->oset)) != NULL; ) { in DRD_()
367 DRD_(bm_has_any_load)(struct bitmap* const bm, const Addr a1, const Addr a2) in DRD_()
371 tl_assert(bm); in DRD_()
375 const struct bitmap2* bm2 = bm2_lookup(bm, address_msb(b)); in DRD_()
419 Bool DRD_(bm_has_any_store)(struct bitmap* const bm, in DRD_()
424 tl_assert(bm); in DRD_()
428 const struct bitmap2* bm2 = bm2_lookup(bm, address_msb(b)); in DRD_()
474 Bool DRD_(bm_has_any_access)(struct bitmap* const bm, in DRD_()
479 tl_assert(bm); in DRD_()
483 const struct bitmap2* bm2 = bm2_lookup(bm, address_msb(b)); in DRD_()
535 Bool DRD_(bm_has_1)(struct bitmap* const bm, in DRD_()
543 tl_assert(bm); in DRD_()
545 p2 = bm2_lookup(bm, address_msb(a)); in DRD_()
555 void DRD_(bm_clear)(struct bitmap* const bm, Addr a1, Addr a2) in DRD_()
559 tl_assert(bm); in DRD_()
574 p2 = bm2_lookup_exclusive(bm, address_msb(b)); in DRD_()
632 void DRD_(bm_clear_load)(struct bitmap* const bm, Addr a1, Addr a2) in DRD_()
636 tl_assert(bm); in DRD_()
651 p2 = bm2_lookup_exclusive(bm, address_msb(b)); in DRD_()
713 void DRD_(bm_clear_store)(struct bitmap* const bm, in DRD_()
718 tl_assert(bm); in DRD_()
733 p2 = bm2_lookup_exclusive(bm, address_msb(b)); in DRD_()
796 Bool DRD_(bm_test_and_clear)(struct bitmap* const bm, in DRD_()
801 result = DRD_(bm_has_any_access)(bm, a1, a2) != 0; in DRD_()
802 DRD_(bm_clear)(bm, a1, a2); in DRD_()
806 Bool DRD_(bm_has_conflict_with)(struct bitmap* const bm, in DRD_()
812 tl_assert(bm); in DRD_()
816 const struct bitmap2* bm2 = bm2_lookup(bm, address_msb(b)); in DRD_()
872 Bool DRD_(bm_load_has_conflict_with)(struct bitmap* const bm, in DRD_()
875 return DRD_(bm_has_conflict_with)(bm, a1, a2, eLoad); in DRD_()
878 Bool DRD_(bm_load_1_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
880 return bm_aligned_load_has_conflict_with(bm, a1, 1); in DRD_()
883 Bool DRD_(bm_load_2_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
886 return bm_aligned_load_has_conflict_with(bm, a1, 2); in DRD_()
888 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 2, eLoad); in DRD_()
891 Bool DRD_(bm_load_4_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
894 return bm_aligned_load_has_conflict_with(bm, a1, 4); in DRD_()
896 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 4, eLoad); in DRD_()
899 Bool DRD_(bm_load_8_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
902 return bm_aligned_load_has_conflict_with(bm, a1, 8); in DRD_()
904 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 8, eLoad); in DRD_()
907 Bool DRD_(bm_store_1_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
909 return bm_aligned_store_has_conflict_with(bm, a1, 1); in DRD_()
912 Bool DRD_(bm_store_2_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
915 return bm_aligned_store_has_conflict_with(bm, a1, 2); in DRD_()
917 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 2, eStore); in DRD_()
920 Bool DRD_(bm_store_4_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
923 return bm_aligned_store_has_conflict_with(bm, a1, 4); in DRD_()
925 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 4, eStore); in DRD_()
928 Bool DRD_(bm_store_8_has_conflict_with)(struct bitmap* const bm, const Addr a1) in DRD_()
931 return bm_aligned_store_has_conflict_with(bm, a1, 8); in DRD_()
933 return DRD_(bm_has_conflict_with)(bm, a1, a1 + 8, eStore); in DRD_()
936 Bool DRD_(bm_store_has_conflict_with)(struct bitmap* const bm, in DRD_()
939 return DRD_(bm_has_conflict_with)(bm, a1, a2, eStore); in DRD_()
1049 void DRD_(bm_unmark)(struct bitmap* bm) in DRD_()
1053 for (VG_(OSetGen_ResetIter)(bm->oset); in DRD_()
1054 (bm2 = VG_(OSetGen_Next)(bm->oset)) != 0; in DRD_()
1065 Bool DRD_(bm_is_marked)(struct bitmap* bm, const Addr a) in DRD_()
1069 bm2 = bm2_lookup(bm, a); in DRD_()
1095 void DRD_(bm_clear_marked)(struct bitmap* bm) in DRD_()
1099 for (VG_(OSetGen_ResetIter)(bm->oset); in DRD_()
1100 (bm2 = VG_(OSetGen_Next)(bm->oset)) != 0; in DRD_()
1136 void DRD_(bm_remove_cleared_marked)(struct bitmap* bm) in DRD_()
1140 VG_(OSetGen_ResetIter)(bm->oset); in DRD_()
1141 for ( ; (bm2 = VG_(OSetGen_Next)(bm->oset)) != 0; ) in DRD_()
1145 && ! DRD_(bm_has_any_access(bm, make_address(a1, 0), in DRD_()
1148 bm2_remove(bm, a1); in DRD_()
1149 VG_(OSetGen_ResetIterAt)(bm->oset, &a1); in DRD_()
1209 void DRD_(bm_print)(struct bitmap* const bm) in DRD_()
1213 for (VG_(OSetGen_ResetIter)(bm->oset); in DRD_()
1214 (bm2 = VG_(OSetGen_Next)(bm->oset)) != 0; in DRD_()