On 04/27/2014 07:23, Rich Freeman wrote:
> On Sat, Apr 26, 2014 at 10:37 PM, "C. Bergström"
> <[email protected]> wrote:
>> #2 The only reference to anything which the compiler could impact is
>> "Use Boyer-Moore (and unroll its inner loop a few times)." Finding out which
>> flag controls that for ${CC} would have some importance. It's almost
>> certainly combined with -O3 and or some standalone loop related
>> optimization. (Nothing depending on LTO). If they were really clever or
>> determined  - there's probably a few GCC or other pragma which could give a
>> hint about unrolling.
> 
> So, I'll certainly agree that package-specific CFLAG tuning will
> always be superior to just setting some flag at the system level and
> walking away.
> 
> And yet, in the same paragraph you mention -O3, which is tantamount to
> just setting a flag and walking away.  That turns on 14 things you
> probably don't really need.
> 
> I run -flto at the system level since in my experience it only causes
> problems with a handful of packages, and when it does provide a
> benefit I get it.  For the most part it just means my compiles at 2AM
> take longer, and a bit more RAM, neither of which are a concern.  If I
> do run into a bug, that is just an opportunity to log it and
> contribute (though to date I haven't been submitting -flto issues as
> bugs as it is still a bit new).

My curiosity, as I have not attempted LTO yet on any machine, is what are
the RAM requirements?  Is it a hard limit, wherein the compiler simply fails
if there isn't enough RAM, or does it just start hitting swap real hard?
Those of us using older archs where the RAM is limited might have to be more
cautious w/ LTO.  I.e., my SGI O2 maxes right now at 512MB.  It can go to
1GB if the odd memory/PROM issue is ever worked out.  But 512MB is it for
now, so what are my odds of successfully using LTO on that?

Especially if LTO helps to reduce the final binary size, that's less data
being shuffled around main memory and the CPU caches, which, although means
slower compile times, might hake such a machine a bit snippier.  Though, I
dread how long GCC will take to build itself w/ LTO.  The O2 already needs
~18hrs for 4.8.  I haven't tried 4.9 on it yet.

-- 
Joshua Kinard
Gentoo/MIPS
[email protected]
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

Reply via email to