This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [lto] Streaming out language-specific DECL/TYPEs
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Kenneth Zadeck" <zadeck at naturalbridge dot com>
- Cc: "Diego Novillo" <dnovillo at google dot com>, "Bill Maddox" <maddox at google dot com>, gcc at gcc dot gnu dot org, "Michael Matz" <matz at suse dot de>
- Date: Tue, 3 Jun 2008 10:51:50 +0200
- Subject: Re: [lto] Streaming out language-specific DECL/TYPEs
- References: <b798aad50806021710g7aa5232m184472c067fda23c@mail.gmail.com> <4844923B.5090405@naturalbridge.com>
On Tue, Jun 3, 2008 at 2:37 AM, Kenneth Zadeck <zadeck@naturalbridge.com> wrote:
> Diego Novillo wrote:
>>
>> In g++.dg/torture/20070621-1.C we are trying to stream out a structure
>> that contains a TEMPLATE_DECL. This currently causes a failure in
>> lto-function-out.c:output_tree because not only TEMPLATE_DECL is
>> C++-specific, we can't even access its fields from lto-function-out.c.
>>
>> The only way I see to handle these cases is to use a langhook. I
>> appreciate that we are trying to get rid of these, but this is only a
>> langhook used when streaming things out (in cc1plus). On the way in
>> (lto1), we would not need the langhook, as we would just mechanically
>> recreate the fields.
>>
>> Thoughts?
>>
>>
>> Diego.
>>
>
> i had been told (but such statements are often lies) that there were not
> supposed to be any languages specific tree codes this late in the
> compilation. if there needs to be, then this should not be a lang specific
> tree code and needs to become a regular tree code.
> the problem with making this a langhook is that there is no "there-there" in
> that on the serialize in side, you would have to recreate the c++ front end
> code that expects this tree code. (if there is no such code, then this tree
> code could/should have been removed before you got there. On the other
> hand, if this tree code needs to be there, then copying the c++ front end
> code that processes it later is a bad road to go down.
>
> I would like to see this publicly discussed by the c++ front end people to
> see why this tree code lingers so long. In all other cases, these late lived
> fe specific tree codes either have or are supposed to have been removed.
I agree with Kenny. Basically if there is nothing in lto1 that can deal
with the data, why would you want to stream it out in the first place?
I guess this is because with C++ there are still some bits that call
back into the frontend very late in the game (debug info and thunks
come to my mind). You may want to read
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00349.html
again to see what C++ FE structures are still live and for what reason.
Richard.