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; 6+ 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] 6+ messages in thread
* Re: double alignment patch for x86
@ 1997-08-17 21:48 Jeffrey A Law
  1997-08-17 21:48 ` ANSI C++ support periority? Amos Shapira
  0 siblings, 1 reply; 6+ messages in thread
From: Jeffrey A Law @ 1997-08-17 21:48 UTC (permalink / raw)
  To: egcs

  In message <E0x0Aav-0001rY-00.1997-08-17-21-02-33_pgcc_forever_@cerebro>you w
rite:
  > Here is my double alignment patch, this time relative to egcs-ss-970814...
  > 
  > It improves performance *much* on the x86...
HJ has already submitted this patch.  I'd like to hear from Stan Cox
before doing anything with it since he's the x86 maintainer.

Also, do you have a copyright assignment on file with the FSF?

jeff

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

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

Thread overview: 6+ 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-17 21:48 double alignment patch for x86 Jeffrey A Law
1997-08-17 21:48 ` ANSI C++ support periority? Amos Shapira

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).