Chris Lattner wrote:
On Jul 24, 2008, at 9:26 AM, Kenneth Zadeck wrote:
3) Generate the debugging for the types late. The problem here is
that we want the gimple type system to be stripped of the front end
specific information, so any front end specific info that is only
necessary for the debugging, will both bulk up the gimple type
system and make it less language independent.
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.
The reason that this example is flawed, is that we will have to keep
this "weak" private attribute if we generate the debugging info late so
that the debugger could see it (assuming it cares).
-Chris