[Bug debug/83941] Debug info generated with -flto contains useless forwarders

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 19 13:28:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83941

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I didn't yet try to quantify the amount of possible savings with pruning (well,
I tried with the simple patch but that keeps ICEing ... ;)).

Jakub, any opinion on the best approach here?

We eventually could, for DW_TAG_variables in local scopes, prune them when
we fail to annotate them (aka create them late) - that's maybe early enough
to avoid references from location lists (OTOH debug stmts might contain
references to them...).

Of course a post-processing tool like dwz could also remove them if they are
unused.


More information about the Gcc-bugs mailing list