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: [commit, spu] Improve address generation for large stack frames


Richard Henderson wrote:
> On 08/16/2011 11:35 AM, Ulrich Weigand wrote:
> > +       /* Reload the displacement.  */
> > +       push_reload (XEXP (ad, 1), NULL_RTX, &XEXP (ad, 1), NULL,
> > + 		   BASE_REG_CLASS, GET_MODE (ad), VOIDmode, 0, 0,
> > + 		   opnum, (enum reload_type) type);
> 
> Are you sure you want to reload it this way, and not
> 
>   (plus (plus base const-large) const-small)
> 
> ?  If you push that inner reload, it seems like it would be 
> sharable/cse-able with other variable references within the block.

Well, yes, but I don't have an instruction to implement the
inner plus (SPU add immediate is restricted to +/- 512), so
I'd still have to reload the large constant as well and would
get another instruction.

This results in actually worse code if no sharing ends up
possible, so I'm not sure if it's worth it overall ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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