Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Optimal options for egcs optimization?
@ 1997-12-14 12:35 Harvey J. Stein
  1997-12-15  1:45 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Harvey J. Stein @ 1997-12-14 12:35 UTC (permalink / raw)


Does anyone know what the best optimization flags to use with egcs
would be?

I've tried:

   -O9
   -O9 -funroll-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164a -static
   -O9 -funroll-all-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimiztions -fschedule-insns -fschedule-insns2 -frerun-cse-after-loop
   -O9 -funroll-all-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimizations -fschedule-insns -fschedule-insns2 -frerun-cse-after-loop
   -O3 -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimizations -funroll-loops

I assumed -O9 was the same as -O3, but then switched back to -O3 just
in case this isn't true.  And, btw, I found all of the above to be
slower than gcc 2.7.2.1 with -O2.  The first was close enough that the
difference could be considered noise, but the others were
significantly slower (except for the last which I haven't finished
testing yet.)

Also, the -mcpu=21164a failed in compilation with lots of complaints
about the $at register being used in a noat environment again.

Thanks,

-- 
Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Optimal options for egcs optimization?
@ 1997-12-15  0:03 Fabio Perroni
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Perroni @ 1997-12-15  0:03 UTC (permalink / raw)


Harvey J. Stein wrote:

> Does anyone know what the best optimization flags to use with egcs
> would be?
>
> I've tried:
>
>    -O9
>    -O9 -funroll-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164a -static
>    -O9 -funroll-all-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimiztions -fschedule-insns -fschedule-insns2 -frerun-cse-after-loop
>    -O9 -funroll-all-loops -finline-functions -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimizations -fschedule-insns -fschedule-insns2 -frerun-cse-after-loop
>    -O3 -ffast-math -fomit-frame-pointer -mcpu=21164 -static -fexpensive-optimizations -funroll-loops
>
> I assumed -O9 was the same as -O3, but then switched back to -O3 just
> in case this isn't true.  And, btw, I found all of the above to be
> slower than gcc 2.7.2.1 with -O2.  The first was close enough that the
> difference could be considered noise, but the others were
> significantly slower (except for the last which I haven't finished
> testing yet.)
>
> Also, the -mcpu=21164a failed in compilation with lots of complaints
> about the $at register being used in a noat environment again.
>
> Thanks,
>
> --
> Harvey J. Stein
> Berger Financial Research
> hjstein@bfr.co.il
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

  Same results .... even on my PPro-200 (RH4.2)  I found that gcc-2.7.2.2 is
15% faster then egcs-1.0.

---------------
Fabio Perroni          |
<fabio.p@oasi.it>     |
---------------

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Optimal options for egcs optimization?
  1997-12-14 12:35 Optimal options for egcs optimization? Harvey J. Stein
@ 1997-12-15  1:45 ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 1997-12-15  1:45 UTC (permalink / raw)


On Sun, Dec 14, 1997 at 02:35:43PM +0200, Harvey J. Stein wrote:
> [ Lots of options ]

All of the -f bits you mention are implied by -O3 except for -ffast-math
and -funroll-loops; -O2 excludes -finline-functions.  See 

  info gcc "invoking" "optimize"

for all of this spelled out.

Personally I've almost always found they slow things down a bit. 
Just plain -O2 seems to work best at present.

> Also, the -mcpu=21164a failed in compilation with lots of complaints
> about the $at register being used in a noat environment again.

You need a newer binutils for that.  The one from RH5 should be
just fine, but note that you can't just drop that into RH4.

r~

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Optimal options for egcs optimization?
@ 1997-12-15 10:52 Harvey J. Stein
  0 siblings, 0 replies; 4+ messages in thread
From: Harvey J. Stein @ 1997-12-15 10:52 UTC (permalink / raw)


Richard Henderson <rth@dot.cygnus.com> writes:

> Just plain -O2 seems to work best at present.

What about the Haifa instruction scheduler?  Is that a good thing to
use on the Alphas, or would I be better off building with haifa
disabled?

I'm especially concerned about optimization because we're getting
harrassed by the system administrators who want to use 300mhz
Ultra-sparcs instead of Alphas running Linux.  I now have to prove
that the Alphas are sufficiently faster than the Suns to justify
supporting such a <sarcasm>radical</sarcasm> platform.  So, I want to
get the best compiler & compile time options that I can, and I'd
prefer the compiler to be gcc.  I suppose I could argue that if
they're going to use Sun's C compiler, then they should use DEC's C
complier on the Linux/Alpha boxes (by statically linking under DEC
Unix), but then we'd have to get a DEC box, and they already have the
sun box, and ...

> > Also, the -mcpu=21164a failed in compilation with lots of complaints
> > about the $at register being used in a noat environment again.
> 
> You need a newer binutils for that.  The one from RH5 should be
> just fine, but note that you can't just drop that into RH4.

Would -mcpu=21164a help, or is -mcpu=21164 equally good?  But in any
case, which binutils version would be needed & where can I get it?  Is
2.8.1 from prep.ai.mit.edu good enough?  I tried 2.8.1.0.15 from
tsx-11.mit.edu, but it didn't even configure.  It said:

   *** BFD does not support target alphaev5-unknown-linux-gnu.
   *** Look in bfd/config.bfd for supported targets.

I presume it'd configure with target = alpha-unknown-linux-gnu?  What
about building the RH5 one from source on RH4?

Also, would the newer binutils also fix the problem of sometimes
seeing masses of "relocation truncated to fit" errors during linking?

Thanks,

Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-12-15 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-14 12:35 Optimal options for egcs optimization? Harvey J. Stein
1997-12-15  1:45 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-12-15  0:03 Fabio Perroni
1997-12-15 10:52 Harvey J. Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox