lto gimple types and debug info

Daniel Berlin dberlin@dberlin.org
Thu Jul 24 21:57:00 GMT 2008


On Thu, Jul 24, 2008 at 2:13 PM, Chris Lattner <clattner@apple.com> wrote:
> On Jul 24, 2008, at 10:16 AM, Kenneth Zadeck wrote:
>>>
>>> I thought the whole idea of the LTO project was to keep as much language
>>> specific type information as late as possible.  If you start stripping out
>>> useful information about types, it becomes harder to do high level
>>> optimizations like devirtualization and other source-specific
>>> transformations.  This is one of the major advantages of LTO, no?
>>>
>> I think that there is a lot of front end information in the types that
>> really is not useful to the middle ends.   That can be stripped away.  I
>> certainly do not want to strip anything that could be used for something
>> like devirtualization.
>> As a (possibly flawed example), the private attribute in c++ is completely
>> useless for optimization because it is legal for functions that otherwise
>> have no access to a private field to gain access by pointer arithmetic.
>>  However, in a truly strongly typed language, the private attribute can be
>> used to limit the scope of a variable to a single compilation unit.
>
> Ok, but how do you decide whether something is important or not to keep?
>  Why go through the work of removing the information if you may need it
> later?  How much will you really be able to take out?  Is this about
> removing a bit here and a bit there, or is there a large volume of the info
> that can be removed?

I dunno, this seems like a thing you could better figure out by trying
it and seeing where the problems are than by trying to anticipate
every single possible problem
(not that there should be no design, but that it would be better to
start with a design and iterate it than try to figure out perfect
ahead of time).
>
> -Chris
>



More information about the Gcc mailing list