On Wed, Sep 3, 2014 at 10:54 AM, Aldy Hernandez <al...@redhat.com> wrote:
> [Jason, Richard]: Is it useful for my patches to contain ChangeLog entries?
> I find them mildly annoying for something that will inevitably be rewritten
> multiple times, but if it aids in reviewing my WIP, I am more than happy to
> continue including them.
>
>
> On 08/28/14 11:01, Jason Merrill wrote:
>>
>> On 08/28/2014 01:34 PM, Aldy Hernandez wrote:
>>>
>>> I wonder if instead of early dumping of all the DECLs, we could only
>>> dump the toplevel scoped DECLs, and let inheritance set the proper
>>> contexts.
>>
>>
>> Yes, I think this makes a lot more sense; do it at a well-defined point
>> in compilation rather than as part of free_lang_data.
>
>
> Great.  It turned out, this was a cleaner approach as well.
>
>
>>> The problem being that to calculate `ext_block' above, we need intimate
>>> knowledge of scopes and such, only available in the FE.  Is there a
>>> generic way of determining if a DECL is in global scope?
>>
>>
>> Why not do it in the FE, i.e. *_write_global_declarations?
>
>
> This is what I've done in this patch.
>
> I'm no longer generating dwarf early from free_lang_data, instead I'm using
> the global_decl debug hook and adding an EARLY argument.  Then I call it
> twice, once after the FE is done, and once after the full compilation has
> finished (cgraph has been generated, etc).  The goal is to have the first
> pass generate the DIEs and the 2nd pass fill in location information and
> such.
>
> Generating the globals first solves the context issue.  The recursive nature
> of generating DIEs gets everything right.  For that matter,
> with the attached patch, I actually get *LESS* guality failures than before.
> Unexpected, but I'm not going to complain ;-).
>
> I have added a few (temporary) checks to make sure we're not regenerating
> DIEs when we already have one (at least for DECLs).  These should go away
> after this work is incorporated into mainline.
>
> FYI, I am only handling C for now while we iron out the general idea.
>
> How does this look?
>

I think this merge caused bootstrap failure on Linux/i686

https://gcc.gnu.org/ml/gcc-regression/2014-09/msg00010.html


-- 
H.J.

Reply via email to