On 04/27/14 06:23 PM, Rich Freeman wrote:
On Sat, Apr 26, 2014 at 10:37 PM, "C. Bergström"
<cbergst...@pathscale.com> 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 was trying to give a simplified example... no need to nitpick my reply (Every compiler defines -O3 differently and even the flag to unroll loops and that threshold may be different.. ...)

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.
Can you name a single package that you use which receives a measurable benefit from LTO? (Just asking)

I don't disagree about enabling it, filing bug reports or many other things. I'm just curious if you have any hard numbers... (You seem passionate and sorry if this seems like I'm putting you on the spot)

/*
Side note
IPA (aka whole program and LTO) is by far the hardest optimizations I've ever personally had to debug/engineer/tune in a compiler. Making it robust needs passionate users who file good reduced test cases. While for a single source you have creduce or delta - what options are there for automated reduction of whole program problems..
*/


Reply via email to