This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 03/19/2015 02:08 AM, Richard Biener wrote:
On Wed, Mar 18, 2015 at 10:28 PM, Jason Merrill <jason@redhat.com> wrote:If you move the call to rest_of_decl_compilation we could go through and prune the debug info for unused decls at dwarf2out_finish time, the way we do with unused types.True. Note that the varpool nodes eventually get created once the first use is seen. So I wonder how much garbage we create by unconditionally creating the node in rest_of_decl_compilation (yeah, header files, of course - probably a similar issue for unused function declarations?). I'd prefer to do early_global_decl from rest_of_decl_compilation (and shun the symtab/varpool walk - but that would require the FEs would hand off each global that possibly needs debug info through rest_of_decl_compilation). To prune globals during early(!) dwarf2out_finish you should be able to use the symbol table (not sure if we prune all unused symbols, but surely the list of references should be empty). Richard.
Thank you both.I have moved the debug early generation for _symbols_ to rest_of_decl_compilation. I'm not so so brave as to move FUNCTION_DECL's and such. Besides, things are working fine. Let me get through the rest of my gdb regressions. :).
I am now running gdb tests for every patch, in an effort to fix the plethora of regressions I have caused over the past few months. The current patch exposes no regressions for guality.exp, or for the gdb testsuite. For that matter, it fixes 4-5 gdb regressions.
I will prune the unused DIEs in a subsequent patch; actually much later, when I'm done regression hunting.
Let me know if you have any problems with this. I am committing to the branch.
Aldy
Attachment:
curr
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |