public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Built egcs-1.1b on i586-pc-linux-gnulibc1, -fgcse slowdowns
@ 1998-09-21 19:37 N8TM
  0 siblings, 0 replies; 3+ messages in thread
From: N8TM @ 1998-09-21 19:37 UTC (permalink / raw)
  To: drc, egcs

In a message dated 9/21/98 2:16:03 PM Pacific Daylight Time, drc@adni.net
writes:

> Should I generally compile things with -fno-gcse, or is it likely to be a
>  quirk with this particular program?
>  
I compile for Intel with -Os -fstrict-aliasing unless I have reason to check
whether -O2 may be faster.  Before I try -O2, I try -funroll-loops.  As you
found, the gcse optimizations often fail to improve performance on Intel,
presumably due to register scarcity.

I have seen big improvements from egcs-1.1 to egcs-19980914 on hppa and mips,
using -O2, but not on Intel.

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

* Re: Built egcs-1.1b on i586-pc-linux-gnulibc1, -fgcse slowdowns
  1998-09-21  7:32 David R. Conrad
@ 1998-09-21 14:55 ` Jeffrey A Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1998-09-21 14:55 UTC (permalink / raw)
  To: David R. Conrad; +Cc: egcs

  In message < Pine.LNX.3.96.980921082537.5478A-100000@darwin.adni.net >you write:
  > so I recompiled egcs-1.1b with --disable-haifa and it went up a bit.  I've
  > been playing with various options, and I found that egcs-1.1b gets the
  > time down to 5m40s *IF I GIVE THE -fno-gcse SWITCH*!
  > 
  > Should I be surprised that gcse pessimizes my code?
Somewhat suprised.

One of the problems with the existing gcse code is that it can lengthen
register livetimes unnecessarily.  This can hurt code in some cases.

In my benchmarking of the gcse algorithm that is currently in egcs it
generally improved code on the x86, but not always.

The cases where it made code worse were all problems with the extended
lifetimes of registers causing spills.

Cygnus will be donating an updated algorithm to implement global cse
which should improve the register lifetime situation with gcse.


jeff

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

* Built egcs-1.1b on i586-pc-linux-gnulibc1, -fgcse slowdowns
@ 1998-09-21  7:32 David R. Conrad
  1998-09-21 14:55 ` Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: David R. Conrad @ 1998-09-21  7:32 UTC (permalink / raw)
  To: egcs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have successfully built egcs-1.1b on darwin, my linux 2.1.119 system:

Linux darwin 2.1.119 #5 Sat Sep 5 13:45:37 EDT 1998 i586 unknown

A Pentium 166Mhz non-MMX machine with 32 Meg ram.  One odd thing:  I have
a cpu-bound program I'd written which took about 6 minutes to run to
completion when compiled with gcc-2.7.2.1.  It took about 5m47s when
compiled with gcc from egcs-1.0.3 with -O6 -fomit-frame-pointer -mpentium
- -funroll-loops.

I tried --enable-haifa (does this make sense on a pentium?) and got 6m13s
so I recompiled egcs-1.1b with --disable-haifa and it went up a bit.  I've
been playing with various options, and I found that egcs-1.1b gets the
time down to 5m40s *IF I GIVE THE -fno-gcse SWITCH*!

Should I be surprised that gcse pessimizes my code?

Should I generally compile things with -fno-gcse, or is it likely to be a
quirk with this particular program?

Would you like a copy of the program (480 bytes) that I'm trying all this
with?

I'm hesitant to recompile my kernel with this compiler; any thoughts on
how I can tell what optimization options get the best results there?

All in all, though, I'm impressed by the egcs project.

Cheers,

David R. Conrad, drc@adni.net
Nota Bene, India and Pakistan: "If you go on with this nuclear arms race,
all you are going to do is make the rubble bounce." -- Winston Churchill

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBNgZJIIPOYu8Zk+GuEQINGgCgrC+bO7j5z4Nzmlh+uWWtxagPogEAn2Ah
aTqeqf2VxFQ01gMAZ2XTsEWD
=UbCX
-----END PGP SIGNATURE-----


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

end of thread, other threads:[~1998-09-21 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-21 19:37 Built egcs-1.1b on i586-pc-linux-gnulibc1, -fgcse slowdowns N8TM
  -- strict thread matches above, loose matches on Subject: below --
1998-09-21  7:32 David R. Conrad
1998-09-21 14:55 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).