Re: Planned LTO driver work

2006-11-10 Thread Ian Lance Taylor
Mark Mitchell [EMAIL PROTECTED] writes: 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

Re: Planned LTO driver work

2006-11-10 Thread Mark Mitchell
Ian Lance Taylor wrote: Mark Mitchell [EMAIL PROTECTED] writes: 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

Re: Planned LTO driver work

2006-11-10 Thread Mike Stump
On Nov 9, 2006, at 11:37 PM, Mark Mitchell wrote: It might be that we should move the invocation of the real linker back into gcc.c, so that collect2's job just becomes Or move all of collect2 back into gcc.c. There isn't a reason for it being separate any longer.

Planned LTO driver work

2006-11-09 Thread Mark Mitchell
This message outlines a plan for modifying the GCC driver to support compilation in LTO mode. The goal is that: gcc --lto foo.c bar.o will generate LTO information for foo.c, while compiling it, then invoke the LTO front end for foo.o and bar.o, and then invoke the linker. However, as a

Re: Planned LTO driver work

2006-11-09 Thread Ian Lance Taylor
Mark Mitchell [EMAIL PROTECTED] writes: 1. Add a --lto option to collect2. When collect2 sees this option, treat all .o files as if they were .rpo files and recompile them. We will do this after all C++ template instantiation has been done, since we want to optimize the .o files after the

Re: Planned LTO driver work

2006-11-09 Thread Andrew Pinski
On Thu, 2006-11-09 at 12:32 -0800, Mark Mitchell wrote: 1. Add a --lto option to collect2. When collect2 sees this option, treat all .o files as if they were .rpo files and recompile them. We will do this after all C++ template instantiation has been done, since we want to optimize the .o

Re: Planned LTO driver work

2006-11-09 Thread Mark Mitchell
Andrew Pinski wrote: On Thu, 2006-11-09 at 12:32 -0800, Mark Mitchell wrote: 1. Add a --lto option to collect2. When collect2 sees this option, treat all .o files as if they were .rpo files and recompile them. We will do this after all C++ template instantiation has been done, since we want

Re: Planned LTO driver work

2006-11-09 Thread Mark Mitchell
Ian Lance Taylor wrote: Mark Mitchell [EMAIL PROTECTED] writes: 1. Add a --lto option to collect2. When collect2 sees this option, treat all .o files as if they were .rpo files and recompile them. We will do this after all C++ template instantiation has been done, since we want to

Re: Planned LTO driver work

2006-11-09 Thread Ian Lance Taylor
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

Re: Planned LTO driver work

2006-11-09 Thread Mark Mitchell
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