On 05/31/2017 09:34 AM, Richard Biener wrote:
Actually for the bigger picture I'd refactor rest_of_decl_compilation, not
calling it from the frontends but rely on finalize_decl/function. The missing
part would then be calling the dwarf hook which should eventually be done
at some of the places the frontends now call rest_of_decl_compliation.
[…]
But for an easier way (you might still explore the above ;)) just remove
the guards from dwarf2out.c and handle it more like types that we
prune if they end up being unused (OTOH I guess we don't refer to
the decl DIEs from "calls" because not all calls are refered to with
standard DWARF -- the GNU callsite stuff refers them I think but those
get generated too late).
That said, when early_finish is called the cgraph and IPA references
exists and thus you can
sort-of see which functions are "used".
Ok, thanks. I’ll give a try to the first option, then. :-)
--
Pierre-Marie de Rodat