This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reg+reg addressing mode on SPARC
- To: Joe Buck <jbuck at synopsys dot com>
- Subject: Re: reg+reg addressing mode on SPARC
- From: Dan Nicolaescu <dann at godzilla dot ICS dot UCI dot EDU>
- Date: Fri, 10 Aug 2001 15:48:31 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200108102223.PAA27969@atrus.synopsys.com>
Joe Buck <jbuck@synopsys.com> writes:
> > GCC seems to be using the reg+reg addressing mode quite a lot, even
> > when it's not a clear win.
>
> There is already a GNATS bug for the pessimal code we get for simple
> Fortran-style loops in C/C++ on the Sparc (c++/2430). This bad code has been
> there for a while, and has the interesting effect that the Stepanov
> benchmark reports a score below 1 on the Sparc (since the simple loop
> is misoptimized but the more complex loops are not).
>
> I'm not sure that the problem is addressing mode selection, though.
> Seems to me that the failure may be at a higher level, having to do with
> hoisting invariants out of loops.
That might as well be.
Also if ADDRESS_COST means what I think it means, then it's not quite
right that reg+reg, reg+int or just reg all have the same cost: 1.
What do you think?
--dan