https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68173
--- Comment #13 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Richard Biener from comment #12) > callgrind points at bitmap_set_bit called via process_bb_lives -> > mark_regno_dead. > Maybe some code in that (the DCE code?) can be keyed on if (optimize). > > in mark_regno_dead callgrind points to > > bitmap_set_bit (bb_killed_pseudos, regno); > > being the expensive one. I've tried to implement bb_killed_pseudos and bb_gen_pseudos as sparsesets but it gave nothing in term of compiler speed. I think the major problem is in processing too many pseudos in -O0 mode which are about 1000 times more than in -O2 mode.