On Sun, 2012-01-15 at 19:42 +0100, Mark Wielaard wrote: > I noticed that when you generate dwarf for an inlined function it often > comes with duplicate range lists for both the DW_TAG_inlined_subroutine > and the child DW_TAG_lexical_block DIE.
I filed a bug report for it with some additional statistics: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51902 > I had hoped I could detect and then reduce the duplication of the range > lists in this case with the attached patch where I just check that the > basic block numbers for the ranges are the same as the ranges of its > context DIE. But that doesn't actually work since by looking at the > generated assembly the basic block asm labels are in the same place, > the block numbers are actually different (and so there are actually > two differently named/numbered labels generated at the same place). > [...] > Is there a way to detect that basic blocks have the same range even > though they have different block numbers? Or am I not looking/thinking > about this issue correctly? I don't mind trying to fix this myself, but would need some help. As a start could I trick someone into looking at my patch and saying something like: "yeah, looks sane, take a look at BLOCK_FOOBAR_RANGE_NUM to get at the info you actually want" or "sorry, you would need to do that at a totally different level, the range/basic block chain information is just lost at dwarf2out time". Thanks, Mark