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: rs6000 toc reference rtl again


On Wed, Apr 04, 2012 at 10:25:39AM +0100, Richard Sandiford wrote:
> With the loop thing, do you mean that you're seeing too many HIGHs
> being hoisted?

No, nothing as complicated as that.  In a lot of cases, any hoisting
of the high part is bad, because the linker nops out the high part and
edits the low part insn when the r2 offset can be done in 16 bits.  If
the high part insn was the only use of a call-saved reg, then the
function saves and restores a reg to no purpose.

> > I'm not wedded to the representation, *but* we do want gcc to treat
> > the high part as a constant.  That's important because we don't ever
> > want reload saving the high part to a stack slot!  Which is what does
> > happen if you don't somehow tell gcc it is a constant.
> 
> Out of curiosity, does that still happen if you have a HIGH REG_EQUAL
> note attached to the addition?  I'd have expected reload to convert
> the note into a REG_EQUIV and treat the source as a function invariant.

I saw that possibility in reload, and did try a REG_EQUIV note before
I wrapped the ADD in a CONST as we have currently.  Some early pass
deleted the notes for me.  I forget which one.

Oh well, I was going to try splitting after reload anyway.

-- 
Alan Modra
Australia Development Lab, IBM


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