This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [commit, spu] Improve address generation for large stack frames
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: rth at redhat dot com (Richard Henderson)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Aug 2011 14:27:05 +0200 (CEST)
- Subject: 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