Daniel Berlin wrote:
On Sun, Jul 27, 2008 at 1:18 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote:
David Edelsohn wrote:
I do not expect LTO (or WHOPR) to work on AIX -- at least not
without a lot of work on wrappers around the AIX linker. However, I do
not understand why enhancing GCC to support LTO -- when GCC is run without
enabling LTO -- requires locking GCC completely into DWARF debugging.
I agree that, at least in principle, it should be possible to emit the debug
info (whether the format is DWARF, Stabs, etc.) once.
No, you can't.
You would at least have to emit the variables separate from the types
(IE emit debug info twice).
So, I don't see a
reason that this makes us a DWARF-only compiler either.
Others have raised the issue of types which are fundamentally transformed by
the compiler (such as by removing fields). I think that such opportunities
are going to be relatively rare; the global "struct Window" object in a GUI
library full of functions taking "struct Window *" parameters probably isn't
optimizable in this way. But there will be situations where this is
possible and profitable of course.
In that case, I'm not sure that *type* ought to be modified at all, from the
debug perspective. To the extent there's still an object of type "struct X"
around, it's type is still what it was.
Uh, except that if you only write things out once, and have already
written out the variables, the variable no longer has the correct type
if you've rewritten the type, and if we've already emitted debug info,
it won't display properly anymore (since the locations of data members
the type specifies will now be incorrect).
So are you suggesting we emit debug info at multiple times
it is my guess that we are still going to have to generate the debugging
info for the variables late, if for no other reasons, that things like
stack offsets are not set until then. If that is true, we could
possibly just generate a new type and abandon the first one.
kenny