This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Painful problems with -fpic implementation on powerpc-sysv
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: Painful problems with -fpic implementation on powerpc-sysv
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 26 Aug 1998 00:45:32 -0600
- cc: Geoff Keating <geoffk at ozemail dot com dot au>, egcs at cygnus dot com, Franz dot Sirl-kernel at lauterbach dot com
- Reply-To: law at cygnus dot com
In message <9808232356.AA36800@marc.watson.ibm.com>you write:
> >>>>> Geoff Keating writes:
>
> Geoff> Reload sees that its choices are either:
>
> Geoff> - load immediate value in GPRs, store value to memory, load FPR back
> Geoff> from memory; or
> Geoff> - load FPR directly from memory.
>
> Geoff> Naturally, it chooses the second.
>
> That is exactly my point. reload has another alternative and is
> *choosing* the load from memory based upon some cost analysis. I propose
> changing the cost analysis when in reload so that the value is
> materialized in GPRs and transferred via stack memory instead of a
> symbol_ref.
Generally that does not work -- it's just a cost, and eventually the
costs will do something unexpected and you'll lose. One of my all-time
losers was when I had a cost thing in reload overflow and reload
thought using the 5bit shift register on the PA was really cheap
instead of really expensive (and wrong if you've got a 32bit value).
I would not recommend this approach.
jeff