What's new in GCC 4.5?
What's new in GCC 4.5?
Posted May 14, 2010 21:18 UTC (Fri) by giraffedata (guest, #1954)In reply to: What's new in GCC 4.5? by nix
Parent article: What's new in GCC 4.5?
Thanks for the explanation.
I suppose the objective is not just to let someone choose a non-LTO link, but for the .o file to be useful by a linker that doesn't even know what LTO is.
I was going to say the time to write the GIMPLE shouldn't be enough to be a consideration against using -lto, but then I remembered that I once avoided compiling with debugging information because I was using NFS and writing the .o files took significantly longer with -g.
Posted May 14, 2010 21:45 UTC (Fri)
by nix (subscriber, #2304)
[Link] (1 responses)
Posted May 14, 2010 22:51 UTC (Fri)
by giraffedata (guest, #1954)
[Link]
First, to be clear, I'm using the term "linker" in the same sense as the phrase "link time" in the name LTO, which means the linker is GCC. GCC is the program to which you feed .o files and get an executable out.
If instead of using GCC to link my .o files I use GNU 'ld', it will still work, right? And it looks like 'ld' doesn't know what LTO is.
Even GCC doesn't always know what LTO is. GCC 3 doesn't.
LTO could have been designed so that 'ld' and GCC 3 could not link the .o files created by gcc -flto, but it looks to me like it was a design objective that they be able to.
Posted May 14, 2010 22:43 UTC (Fri)
by stevenb (guest, #11536)
[Link]
So the GIMPLE goes through the compiler pipeline twice: during compilation to an object file, and during link time optimizations. That is where the extra cost comes from.
We have our smartest people working on a solution for this... ;-)
What's new in GCC 4.5?
What's new in GCC 4.5?
What's new in GCC 4.5?