gcc-3.1 optimisations (for pentium3)?

gcc-3.1 optimisations (for pentium3)?

Post by Ray » Mon, 24 Jun 2002 19:57:38



folks

what would be the gcc flags for getting optimised code for pentium3?  i
have currently been using

     -O2 -march=pentium3 -mmmx -msse

but dont know if the -march=pentium3 is sufficient to get all other
relevent flags.

additionally, has anyone recommended against using gcc-3.1 for building
the 2.4.x kernels?  if not, are they any compiler flags (additional to
the ones used by gcc-2.95.x) that would be suitable for kernel
compilation?  i saw someone recommend -mfpmath=sse

thanks
ray

 
 
 

gcc-3.1 optimisations (for pentium3)?

Post by Billy O'Conno » Tue, 25 Jun 2002 00:56:29



> folks

> what would be the gcc flags for getting optimised code for pentium3?
> i have currently been using

>      -O2 -march=pentium3 -mmmx -msse

> but dont know if the -march=pentium3 is sufficient to get all other
> relevent flags.

Try these:

-mcpu=i686 -march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4

Enjoy!

--
Billy O'Connor                        "s/[Ll]inux/GNU\/Linux/g"
.GNET package maintainer
360 degrees of portability,
that's business with .GNET            Emacsic Jihad

 
 
 

gcc-3.1 optimisations (for pentium3)?

Post by John Thompso » Tue, 25 Jun 2002 05:07:59



>> what would be the gcc flags for getting optimised code for pentium3?
>> i have currently been using

>>      -O2 -march=pentium3 -mmmx -msse

>> but dont know if the -march=pentium3 is sufficient to get all other
>> relevent flags.
> Try these:

> -mcpu=i686 -march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4

Doesn't "-march=i686" imply "-mcpu=i686?"  IIRC, -mcpu= is superfluous
when -march= is used.  Or am I wrong?

--


 
 
 

gcc-3.1 optimisations (for pentium3)?

Post by Molchu » Tue, 25 Jun 2002 09:01:27




>>>what would be the gcc flags for getting optimised code for pentium3?
>>>i have currently been using

>>>     -O2 -march=pentium3 -mmmx -msse

>>>but dont know if the -march=pentium3 is sufficient to get all other
>>>relevent flags.

>>Try these:

>>-mcpu=i686 -march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4

> Doesn't "-march=i686" imply "-mcpu=i686?"  IIRC, -mcpu= is superfluous
> when -march= is used.  Or am I wrong?

No, you're right! Of course, -march=i686 implies -mcpu=i686, if you use
the first it's no need in the second. And for the one who does not know
that I would advise to do some simple 'man' typing.
 
 
 

gcc-3.1 optimisations (for pentium3)?

Post by Ray » Thu, 27 Jun 2002 07:39:04


hhmm, any other pentium3 *specific* options (ie like -msse2 is for
pentium4) etc?





>>>> what would be the gcc flags for getting optimised code for pentium3?
>>>> i have currently been using

>>>>     -O2 -march=pentium3 -mmmx -msse

>>>> but dont know if the -march=pentium3 is sufficient to get all other
>>>> relevent flags.

>>> Try these:

>>> -mcpu=i686 -march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer
>>> -funroll-loops -frerun-cse-after-loop -frerun-loop-opt
>>> -malign-functions=4

<snip>
 
 
 

1. GCC-3.0 optimizations for Athlon

Howdy all once again,

A question I've had but can't seem to find an answer to is what
optimization flags should I use to get the most out of my Athlon when
compiling with GCC-3.0.  There are many and most don't specify which
processor benefits from them, so if someone could give me a simple
CFLAGS line like O2 -funroll-loops -mpush-args -etc etc, that would be
great.  Especially if anyone has benchmarked these optimizations to
see if they really work.  Thanks.

ps - I usually use Os to optimize for size, but add some -f extras.

Fred

2. debian 2.2r5-install wants to replace SMP kernel

3. gcc 2.8.1 vs gcc 2.95.3 optimization on Sparc V8

4. Window Maker won't start

5. GCC-i2.6.3 (gcc with pentium optimizations)

6. Right place (file) for static route

7. gcc optimizations for kernel

8. Problems with rlogin/rsh and SLiRP

9. gcc/egcs C optimization

10. Pentium optimization in GCC

11. Kernel GCC Optimizations

12. gcc with pentium optimization?

13. gcc optimisations when compiling the kernel