public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Reload patch to improve 386 code
@ 1997-08-19  8:50 Jakub Jelinek
  1997-08-19  8:50 ` ANSI C++ support periority? Jason Merrill
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jakub Jelinek @ 1997-08-19  8:50 UTC (permalink / raw)
  To: egcs

> 
>    Date: Mon, 18 Aug 1997 11:17:38 -0400 (EDT)
>    From: meissner@cygnus.com
> 
>    I think it is an horrible kludge that reload is run as a pass after
>    global-alloc, and that it forces reload registers not to be used
>    for any other purpose (which is murder on the x86 with each
>    register being special purpose in some way).
> 
> Before this leaves my head, I wanted to point something out which
> you've reminded me of.  When the scheduler (this applies to both the
> original and Haifa versions equally) becomes aggressive, it produces a
> large number of reloads in certain situations.  Reloads which would
> not have happened if scheduling did not take place.  This happens
> especially if register pressure is high already.  I noticed this
> particularly on RISC platforms, seems in this case the more registers
> available the worse things became when the register usage was
> saturated.

I thought about a quick solution, which would be during global-alloc, if it
finds out that the number of hard registers is exceeded, it could try to
undo some short pseudo setup RTL sequence merges and move them to the place
of the actual use, if the pseudo being set up is a constant and computable
in small number of instructions not involving memory loads.
Like that, we could rid of the following horror on sparc64:

	sethi %hi(var1), %r1
	stx %r1, [%sp + NN]
	...
	ldx [%sp + NN], %r1
	or %r1, %lo(var1), %r1
	stx %r1, [%sp + NN]
	...
some loop:
	...
	ldx [%sp + NN], %r1
	ldx [%r1], %r1
	...

and could have:

some loop:
	...
	sethi %hi(var1), %r1
	ldx [%r1 + %lo(var1)], %r1
	...

instead...

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take fool power from the UltraSparc
Linux version 2.0.30 on a sparc machine (291.64 BogoMips).
___________________________________________________________________

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

* Re: ANSI C++ support periority?
  1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
@ 1997-08-19  8:50 ` Jason Merrill
  1997-08-19  9:23 ` bootstrapping problems with native compiler Dave Love
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jason Merrill @ 1997-08-19  8:50 UTC (permalink / raw)
  To: egcs

>>>>> Amos Shapira <amos@gezernet.co.il> writes:

> My main interest in egcs is the need for a good *STandard ANSI C++*
> compiler.  Mainly for Linux (Intel platform for now).  Can anyone tell
> me where does this item stand in the list of periorities of egcs?

The priorities of egcs are whatever people work on.  Cygnus is committed to
development of G++, whether gcc2 or egcs-based.  egcs releases will include
the current C++ frontend.

Jason

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

* Re: bootstrapping problems with native compiler
  1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
  1997-08-19  8:50 ` ANSI C++ support periority? Jason Merrill
@ 1997-08-19  9:23 ` Dave Love
  1997-08-19  9:47 ` egcs: A new compiler project to merge the existing GCC forks (fwd) Dave Love
  1997-08-19  9:47 ` bootstrapping problems with native compiler Jason Merrill
  3 siblings, 0 replies; 13+ messages in thread
From: Dave Love @ 1997-08-19  9:23 UTC (permalink / raw)
  To: egcs

>>>>> "meissner" == meissner  <meissner@cygnus.com> writes:

 meissner> Sounds like it won't work too well on Canadian Crosses
 meissner> where build, host, and target machines are all different.

I can only say that bug reports for cross-g77 have always been
welcome.  There has been a fix made in the development version for
cygwin defining `unix' AFAIR and there were some problems which
appeared to be due to bugs in cygwin which I think should be addressed
there.  (The term `criss-cross' was coined in g77 circles
independently on each side of the Atlantic as a less obscure
alternative to Canadian.)

 meissner> | I don't understand why C++ should stick stuff in libgcc anyhow -- why
 meissner> | isn't its runtime kept separate like objc and fortran?

 meissner> Because GNU C supports static constructors and destructors
 meissner> as well with __attribute__((__constructor__)).

It seems wrong to me if you need to build c++ to get that in C.
__constructor__ is useful for runtime configuration with g77 (and
other languages?) but I hadn't realized the dependency, damn.

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

* Re: bootstrapping problems with native compiler
  1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
                   ` (2 preceding siblings ...)
  1997-08-19  9:47 ` egcs: A new compiler project to merge the existing GCC forks (fwd) Dave Love
@ 1997-08-19  9:47 ` Jason Merrill
  3 siblings, 0 replies; 13+ messages in thread
From: Jason Merrill @ 1997-08-19  9:47 UTC (permalink / raw)
  To: egcs

>>>>> Dave Love <d.love@dl.ac.uk> writes:

> It seems wrong to me if you need to build c++ to get that in C.
> __constructor__ is useful for runtime configuration with g77 (and
> other languages?) but I hadn't realized the dependency, damn.

You don't need C++ for that.  Only the major runtime stuff is built with
g++ (RTTI and EH support code).

Jason

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
  1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
  1997-08-19  8:50 ` ANSI C++ support periority? Jason Merrill
  1997-08-19  9:23 ` bootstrapping problems with native compiler Dave Love
@ 1997-08-19  9:47 ` Dave Love
  1997-08-19  9:47 ` bootstrapping problems with native compiler Jason Merrill
  3 siblings, 0 replies; 13+ messages in thread
From: Dave Love @ 1997-08-19  9:47 UTC (permalink / raw)
  To: egcs

>>>>> "H" == H J Lu <hjl@lucon.org> writes:

 H> I downloaded this a few days ago - compiles and runs without any
 H> problems on a PentiumPro Linux 2.0.30 (Redhat 4.2) system - but:

 H> execution speed (floating point) of a test case (mdbench) 

Note that mdbnch (at least the version I know) is in double precision.
Thus other performance considerations are typically overshadowed on
ppro by the double alignment problems.  See the g77 manual.

 H>  - I am back right now to the old
 H> stuff, unless I get to hear a convincing reason why to switch.

I doubt it's wise to use the g77 in egcs seriously at least until it's
based on a version that's completed alpha testing for g77 0.5.21.

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
  1997-08-19 17:54 Some Haifa scheduler bugs Jeffrey A Law
@ 1997-08-19 17:54 ` Dave Love
  0 siblings, 0 replies; 13+ messages in thread
From: Dave Love @ 1997-08-19 17:54 UTC (permalink / raw)
  To: egcs

>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:

 Jeffrey> Could be -- I don't think gcc-2.7* scheduled instructions on
 Jeffrey> the x86 machines at all.

FWIW, the last gcc2 snapshot I could build (with -m586 in) typically
seemed to gain about 20% on a 586 with single-precision Fortran code,
roughly consistent with numbers reported by proprietary offerings at
the time, though some with `pentium optimization' only seemed to
perform about as well as the gcc-2.7-based g77 (generating 486 code).

If people care about Fortran performance I'll eventually do some
realistic tests on a 586, but have no access to a 686; this isn't
necessarily trivial, though, and I'm more interested in the release of
a correct g77 0.5.21 at this stage.

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
@ 1997-08-19 17:18 Joern Rennecke
  0 siblings, 0 replies; 13+ messages in thread
From: Joern Rennecke @ 1997-08-19 17:18 UTC (permalink / raw)
  To: egcs

>   In message <Pine.GSO.3.96.970819004905.4653A-100000@drabble>you write:
>   > can old scheduler be the source of the problem?
> Could be -- I don't think gcc-2.7* scheduled instructions on the
> x86 machines at all.
> 
> So, one interesting test would be to run the benchmark with "-O2",
> then again with "-O2 -fno-schedule-insns -fno-schedule-insns2".
> 
> That would tell us if we need to focus on the scheduler or not.

And if you look for the best performance right now, I suggest to try
-O2 -fno-schedule-insns .  Scheduling after reload can't hurt register
allocation, and it might do some good.  OTOH, it can hurt when it
disables peepholes.  It's a bity we don't have any actual peephole
optimization pass - combine.c works before reload and is limited in the
number and kind of insns it can combine, and the peepholes used by final
don't allow re-iteration and are not designed to recognize insns sequences
with some unrelated insns in-between.

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
@ 1997-08-19 13:19 H.J. Lu
  0 siblings, 0 replies; 13+ messages in thread
From: H.J. Lu @ 1997-08-19 13:19 UTC (permalink / raw)
  To: egcs

> 
> 
> HJ, can you work with this person to find out _why_ performance
> is suffering?
> 

I am still working on prototyping. But if noone is looking at it,
I will take a look.


H.J.

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
@ 1997-08-19  7:36 Robert Wilhelm
  0 siblings, 0 replies; 13+ messages in thread
From: Robert Wilhelm @ 1997-08-19  7:36 UTC (permalink / raw)
  To: egcs

> 
> Can someone point me the location of mdbench?
>

http://www.sissa.it/furio/Mdbnch/info.html

Robert

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
  1997-08-19  3:52 H.J. Lu
  1997-08-19  4:27 ` Jeffrey A Law
  1997-08-19  5:08 ` Oleg Krivosheev
@ 1997-08-19  6:01 ` Jeffrey A Law
  2 siblings, 0 replies; 13+ messages in thread
From: Jeffrey A Law @ 1997-08-19  6:01 UTC (permalink / raw)
  To: egcs

  In message <Pine.GSO.3.96.970819004905.4653A-100000@drabble>you write:
  > can old scheduler be the source of the problem?
Could be -- I don't think gcc-2.7* scheduled instructions on the
x86 machines at all.

So, one interesting test would be to run the benchmark with "-O2",
then again with "-O2 -fno-schedule-insns -fno-schedule-insns2".

That would tell us if we need to focus on the scheduler or not.


seem like haifa could help the pentium pro, however the i386.md
file would have to be tweaked to get the best performance out of
haifa.

Jeff

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
  1997-08-19  3:52 H.J. Lu
  1997-08-19  4:27 ` Jeffrey A Law
@ 1997-08-19  5:08 ` Oleg Krivosheev
  1997-08-19  6:01 ` Jeffrey A Law
  2 siblings, 0 replies; 13+ messages in thread
From: Oleg Krivosheev @ 1997-08-19  5:08 UTC (permalink / raw)
  To: egcs

  Hi,

On Mon, 18 Aug 1997, Jeffrey A Law wrote:

> HJ, can you work with this person to find out _why_ performance
> is suffering?
> 
> If nobody takes the time to analyze these problems, then performance
> is never going to get significantly better.

can old scheduler be the source of the problem?
i was able to figure out switch --enable-haifa
only looking into ./configure script. New scheduler
is off  by default.

Can someone point me the location of mdbench?

i'll benchmark it...

regards

OK

> 
>   In message <m0x0fih-0004ecC@ocean.lucon.org>you write:
>   > Forwarded message:
>   > >From paehler@atlas.rc.m-kagaku.co.jp Mon Aug 18 19:09:18 1997
>   > Date: Tue, 19 Aug 1997 11:09:07 +0900
>   > From: Arno PAHLER <paehler@atlas.rc.m-kagaku.co.jp>
>   > Message-Id: <199708190209.LAA04886@atlas.rc.m-kagaku.co.jp>
>   > To: "H.J. Lu" <hjl@lucon.org>
>   > In-reply-to: "H.J. Lu"'s message of Sun, 17 Aug 1997 09:12:40 -0700
>   > Subject: egcs: A new compiler project to merge the existing GCC forks
>   > 
>   > 
>   > I downloaded this a few days ago - compiles and runs without any
>   > problems on a PentiumPro Linux 2.0.30 (Redhat 4.2) system - but:
>   > 
>   > execution speed (floating point) of a test case (mdbench) compiled
>   > with f2c+gcc is about 10% slower than using gcc 2.7.2.1 - it is
>   > about the same or very slighly faster than g77 0.5.19.1 when using
>   > g77 0.5.21 - when using single precision both f2c+gcc and g77 are
>   > about 10-25% slower than their gcc 2.7.2.1/g77 0.5.19.1 counter-
>   > parts.
>   > 
>   > I had hoped that performance would improve rather than get worse -
>   > is it so hard to optimize for x86? - I am back right now to the old
>   > stuff, unless I get to hear a convincing reason why to switch.
>   > 
>   > 
>   > Arno
>   > 
>   > 
>   > -- 
>   > H.J. Lu (hjl@gnu.ai.mit.edu)
> 

                                     Oleg Krivosheev, 
                                     MS 345, AD/Physics,
                                     Fermi National Accelerator Laboratory,
                                     P.O.Box 500, Batavia, Illinois, 60510.
                                     phone: (630) 840 8460
                                     FAX  : (630) 840 4552
                                     Email: kriol@fnal.gov

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

* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
  1997-08-19  3:52 H.J. Lu
@ 1997-08-19  4:27 ` Jeffrey A Law
  1997-08-19  5:08 ` Oleg Krivosheev
  1997-08-19  6:01 ` Jeffrey A Law
  2 siblings, 0 replies; 13+ messages in thread
From: Jeffrey A Law @ 1997-08-19  4:27 UTC (permalink / raw)
  To: egcs

HJ, can you work with this person to find out _why_ performance
is suffering?

If nobody takes the time to analyze these problems, then performance
is never going to get significantly better.

  In message <m0x0fih-0004ecC@ocean.lucon.org>you write:
  > Forwarded message:
  > >From paehler@atlas.rc.m-kagaku.co.jp Mon Aug 18 19:09:18 1997
  > Date: Tue, 19 Aug 1997 11:09:07 +0900
  > From: Arno PAHLER <paehler@atlas.rc.m-kagaku.co.jp>
  > Message-Id: <199708190209.LAA04886@atlas.rc.m-kagaku.co.jp>
  > To: "H.J. Lu" <hjl@lucon.org>
  > In-reply-to: "H.J. Lu"'s message of Sun, 17 Aug 1997 09:12:40 -0700
  > Subject: egcs: A new compiler project to merge the existing GCC forks
  > 
  > 
  > I downloaded this a few days ago - compiles and runs without any
  > problems on a PentiumPro Linux 2.0.30 (Redhat 4.2) system - but:
  > 
  > execution speed (floating point) of a test case (mdbench) compiled
  > with f2c+gcc is about 10% slower than using gcc 2.7.2.1 - it is
  > about the same or very slighly faster than g77 0.5.19.1 when using
  > g77 0.5.21 - when using single precision both f2c+gcc and g77 are
  > about 10-25% slower than their gcc 2.7.2.1/g77 0.5.19.1 counter-
  > parts.
  > 
  > I had hoped that performance would improve rather than get worse -
  > is it so hard to optimize for x86? - I am back right now to the old
  > stuff, unless I get to hear a convincing reason why to switch.
  > 
  > 
  > Arno
  > 
  > 
  > -- 
  > H.J. Lu (hjl@gnu.ai.mit.edu)

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

* egcs: A new compiler project to merge the existing GCC forks (fwd)
@ 1997-08-19  3:52 H.J. Lu
  1997-08-19  4:27 ` Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: H.J. Lu @ 1997-08-19  3:52 UTC (permalink / raw)
  To: egcs

Forwarded message:
Date: Tue, 19 Aug 1997 11:09:07 +0900
From: Arno PAHLER <paehler@atlas.rc.m-kagaku.co.jp>
Message-Id: <199708190209.LAA04886@atlas.rc.m-kagaku.co.jp>
To: "H.J. Lu" <hjl@lucon.org>
In-reply-to: "H.J. Lu"'s message of Sun, 17 Aug 1997 09:12:40 -0700
Subject: egcs: A new compiler project to merge the existing GCC forks


I downloaded this a few days ago - compiles and runs without any
problems on a PentiumPro Linux 2.0.30 (Redhat 4.2) system - but:

execution speed (floating point) of a test case (mdbench) compiled
with f2c+gcc is about 10% slower than using gcc 2.7.2.1 - it is
about the same or very slighly faster than g77 0.5.19.1 when using
g77 0.5.21 - when using single precision both f2c+gcc and g77 are
about 10-25% slower than their gcc 2.7.2.1/g77 0.5.19.1 counter-
parts.

I had hoped that performance would improve rather than get worse -
is it so hard to optimize for x86? - I am back right now to the old
stuff, unless I get to hear a convincing reason why to switch.


Arno


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

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

end of thread, other threads:[~1997-08-19 17:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
1997-08-19  8:50 ` ANSI C++ support periority? Jason Merrill
1997-08-19  9:23 ` bootstrapping problems with native compiler Dave Love
1997-08-19  9:47 ` egcs: A new compiler project to merge the existing GCC forks (fwd) Dave Love
1997-08-19  9:47 ` bootstrapping problems with native compiler Jason Merrill
  -- strict thread matches above, loose matches on Subject: below --
1997-08-19 17:54 Some Haifa scheduler bugs Jeffrey A Law
1997-08-19 17:54 ` egcs: A new compiler project to merge the existing GCC forks (fwd) Dave Love
1997-08-19 17:18 Joern Rennecke
1997-08-19 13:19 H.J. Lu
1997-08-19  7:36 Robert Wilhelm
1997-08-19  3:52 H.J. Lu
1997-08-19  4:27 ` Jeffrey A Law
1997-08-19  5:08 ` Oleg Krivosheev
1997-08-19  6:01 ` 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).