Ian Lance Taylor wrote:
> Mark Mitchell <[EMAIL PROTECTED]> writes:
> 
>>> I assume that in the long run, the gcc driver with --lto will invoke
>>> the LTO frontend rather than collect2.  And that the LTO frontend will
>>> then open all the .o files which it is passed.
>> Either that, or, at least, collect2 will invoke LTO once with all of the
>> .o files.  I'm not sure if it matters whether it's the driver or
>> collect2 that does the invocation.  What do you think?
> 
> I think in the long run the driver should invoke the LTO frontend
> directly.  

> That will save a process--if collect2 does the invocation, we have to
> run the driver twice.

Good point.  Probably not a huge deal in the context of optimizing the
whole program, but still, why be stupid?

Though, if we *are* doing the template-repository dance, we'll have to
do that for a while, declare victory, then invoke the LTO front end,
and, finally, the actual linker, which will be a bit complicated.  It
might be that we should move the invocation of the real linker back into
gcc.c, so that collect2's job just becomes generating the right pile of
object files via template instantiation and static
constructor/destructor generation?

-- 
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713

Reply via email to