On Mon, 2007-04-23 at 10:56 -0700, Mark Mitchell wrote:
> Kaveh R. GHAZI wrote:
> > On Mon, 23 Apr 2007, Mark Mitchell wrote:
> > 
> >> I'm certainly not trying to suggest that we run SPEC on every
> >> architecture, and then make -O2 be the set of optimization options that
> >> happens to do best there, however bizarre.
> > 
> > Why not?  Is your objection because SPEC doesn't reflect real-world apps
> > or because the option set might be "bizarre"?
> 
> Some of both, I guess.  Certainly, SPEC isn't a good benchmark for some
> CPUs or some users.  Also, I'd be very surprised to find that at -O2 my
> inline functions weren't inlined, but I'd not be entirely amazed to find
> out that on some processor that was for some reason negative on SPEC.
> I'd be concerned that a SPEC run on Pentium IV doesn't necessarily guide
> things well for Athlon, so, in practice, we'd still need some kind of
> fallback default for CPUs where we didn't do the Acovea thing.
> 
> I'd also suspect if we move various chips to differing options, we'll
> see more bugs due to rarely-tested combinations.  Yes, that will help us
> fix latent bugs, but it may not improve the user experience.  We'll see
> packages that used to compile on lots of platforms start to break more
> often on one platform or another due either to latent bugs in GCC, or
> latent bugs in the application.
> 
> So, I think there's a middle ground between "exactly the same passes on
> all targets" and "use Acovea for every CPU to pick what -O2 means".
> Using Acovea to reveal some of the suprising, but beneficial results,
> seems like a fine idea, though.
If every target had a different set of optimizations on at -O2, then
I'd claim that we've gone horribly wrong somewhere -- both from a 
design and implementation standpoint.

If we're going to go down this path, I'd much rather see us tune 
towards target characteristics than towards targets themselves.

Enabling/disabling a generic optimizer on a per-target basis should
be the option of last resort.

Acovea can be helpful in the process of identifying issues, but I 
strongly believe that using it in the way some have suggested is
a cop-out for really delving into performance issues.


Jeff

Reply via email to