This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix powerpc-linux gcc.dg/20020103-1.c


On Thu, Nov 04, 2004 at 05:27:15PM -0800, Geoff Keating wrote:
> You're hiding information from earlier passes in the compiler, which is 
> not a good thing.

Only if earlier passes can make use of that information.  What exactly
am I hiding?  The r30 access?  Note also that small data operands are
handled by leaving them as symbol_refs, which is similar to what I'm
proposing for got refs.

> >Of course, that argument fails if you really need the unspec early.
> >I'm reasonably confident we don't.  As far as I can tell,
> >unspec_movsi_got was a half-baked attempt to reserve r30 early
> >enough so that r30 was free to use if a function didn't make any got
> >accesses.  True?
> 
> I'm not sure why it had to be an unspec.  However, it would be a really 
> good thing if we could arrange that r30 could be used by functions that 
> don't need the got.

Agreed.  It's not so easy though, since reload might generate the first
got access when it bumps something to memory.

> >> Instead, you should teach reload how to
> >>load from a SYMBOL_REF.  I believe this is just a change to
> >>rs6000_emit_move.
> >
> >I looked at changing reload before taking the approach I did.  It's not
> >quite as simple as you indicate, ie. more than just rs6000_emit_move
> >needs changing, I think.
> 
> What problems did you find?

The first was that code here:
  /* Any constants that aren't allowed and can't be reloaded
     into registers are here changed into memory references.  */
needs to be disabled by TARGET_CANNOT_FORCE_CONST_MEM.  Hmm, I've just
been looking again, and it's likely that the other problems were just
due to my wrong code in rs6000_emit_move.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]