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] |
For 4.0, the fix appears to be as simple as is described in the pr log: split the debug emission out and invoke it after cgraph_optimize. Doing that means that the variable gets emitted if it ever will be, so that its DECL_RTL gets filled in. For 4.1, cgraph gets a bit more clever, which makes the problem harder. This problem won't be solved correctly until cgraph manages *everything* with respect to the object symbol table. I found that there was no good way for cgraph to actually decide after the fact that it could avoid emitting a particular variable. Once the DECL_RTL for a variable has been set, you don't know who has it and what they've done with it. So I've partially (or perhaps totally) disabled cgraph_varpool_remove_unreferenced_decls. I found that we weren't emitting debug info for local statics *at all* without optimization. That had gotten moved to cgraph_varpool_assemble_pending_decls, but we only went down that path with -funit-at-a-time. Thus the change to rest_of_decl_compilation. Tested on i686, ia64, and x86_64 linux. r~
Attachment:
z-40
Description: Text document
Attachment:
z-41
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |