This is the mail archive of the
mailing list for the GCC project.
Re: Merging debug-early work?
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: jason merrill <jason at redhat dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Sat, 09 May 2015 08:45:46 -0700
- Subject: Re: Merging debug-early work?
- Authentication-results: sourceware.org; auth=none
- References: <55494527 dot 6040906 at redhat dot com> <CAFiYyc3znqta385iHCEu0jWXDvFNy0MaFgRZo3auJeh3D-A1nA at mail dot gmail dot com> <554B84D0 dot 5060309 at redhat dot com> <CAFiYyc1VP5YCQN_3iEUZ8po5B1U9QezMKianr47xwGOZV-1d1w at mail dot gmail dot com>
On 05/08/2015 01:51 AM, Richard Biener wrote:
Did you see if --with-build-config=bootstrap-lto still works?
Just did on x86-64 Linux. Bootstrap succeeds without any problems.
While doing the LTO work I wondered why you have the late_global_decl
loop in toplev.c:compile_file at all (well, maybe due to the missing one
for global vars output). At least for function decls we should have covered
everything by that point.
It took a lot of trial and error with Jason reviewing these entry
points, to find the right place to place things and not get a slew of
unused DIEs created or unhandled (local statics, C++ clones, optimized
away symbols, locals, etc etc). I can't remember the details, though
I'm sure we discussed it at length when the patches went into the branch.
Perhaps now that adding an unused decl DIE removal pass is a must, we
could make the early/late business less efficient but cleaner, and then
have the upcoming DIE removal pass clean things up? Ughh...it did take
a while to get right without bloating things too much, but I don't doubt
there are ways to streamline it further.
Early debug seems to be enforced at finalize-compilation-unit time, but
only for function decls - I wonder why not as well for global vars
(and why the odd !decl_function_context check is there for functions).
IIRC, stuff living in functions were handled through recursion within
dwarf2out. I think we would miss local statics, or some such corner
case. I invite you to comment things out and see where things fail in
the bootstrap/tests :).