Hi. I've rewritten bitmap memory statistics which abused unsigned type via register_overhead (map, -((int)sizeof (bitmap_head))). I come up with a concept that each bitmap has assigned a unique ID which is used for stats tracking. It's caused by fact that e.g. DF is heavily reallocating bitmaps that then have a different address. Survives bootstrap with --enable-gather-detailed-mem-stats. Ready for next stage1? Thanks, Martin gcc/ChangeLog: 2019-02-26 Martin Liska * bitmap.c (bitmap_register): Come up with alloc_descriptor_max_uid and assign it for a new bitmap. (register_overhead): Use get_descriptor as a descriptor. (release_overhead): New. (bitmap_elem_to_freelist): Call it. (bitmap_elt_clear_from): Likewise. (bitmap_obstack_free): Likewise. (bitmap_move): Sensitively release memory. * bitmap.h (struct GTY): Add alloc_descriptor. (bitmap_initialize): Initialize alloc_descriptor to zero. * tree-ssa-pre.c (do_hoist_insertion): Use bitmap_move. --- gcc/bitmap.c | 39 ++++++++++++++++++++++++++++----------- gcc/bitmap.h | 17 ++++++++++++++--- gcc/tree-ssa-pre.c | 2 +- 3 files changed, 43 insertions(+), 15 deletions(-)