50% slowdown with LTO

Andi Kleen andi@firstfloor.org
Mon Aug 13 16:52:00 GMT 2012


Ian Lance Taylor <iant@google.com> writes:
>
> Figuring out what has gone wrong is like optimizing any program.  Get
> a profile for your program, e.g., using -pg.  Build the program with
> and without -flto, run it, and look at the resulting profiles.  A 50%
> slowdown should be fairly obvious.  I would guess that GCC has made a
> poor inlining decision, but the profile should show the problem for
> sure.

On modern profiling tools like perf or oprofile you can also
"diff" profiles for this.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only



More information about the Gcc mailing list