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?
-Chris