[lto] PATCH: Add support for referencing types from function bodies

Kenneth Zadeck zadeck@naturalbridge.com
Tue Sep 5 00:35:00 GMT 2006


Mark Mitchell wrote:
> Kenneth Zadeck wrote:
>
>> I can just skip these, or abort, which will be fine for the next week or
>> so while I get the bugs out of the reader.  But Mark, I believe you have
>> to make the decision since you know more of the relevant code, if it
>> will be faster to get rid of CONST_DECL or add the Dwarf support code
>> for it.  This is the same kind of call you made on the types and you
>> need to make a decision so we can just move on.   
>
> There is another option: you can just write out their equivalent
> constants when you encounter them in the writer by following
> DECL_INITIAL.  And, in fact, that is what I think you should do for now.
>
> That will make the LTO writer work for C/C++.  It may not work for
> Objective-C and/or Fortran, but we can cross that bridge when we come
> to it, either by (a) writing out references to CONST_DECLs and
> augmenting the DWARF stuff to deal with that, or (b) adjusting those
> front ends to move away from CONST_DECLs at that point.
>
> Since I think most people think that (b) is the right choice, doing
> what I'm suggesting here avoids digging ourselves deeper into the
> CONST_DECL hole, while still allowing us to make progress.
>
This is exactly what I did not want to do.  Because now the output
gimple will be different from the input gimple and it will make it more
difficult to verify that I am doing the lto reading and writing correctly.


Kenny



More information about the Gcc-patches mailing list