This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC mini-summit - compiling for a particular architecture


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.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]