This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Eliminating unnecessary loads on SPARC + IA64
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: john dot gill at quadrics dot com
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 03 Mar 2005 08:48:12 -0500
- Subject: Re: Eliminating unnecessary loads on SPARC + IA64
- References: <30062B7EA51A9045B9F605FAAC1B4F62170E2F@exch01.quadrics.com>
On Thu, 2005-03-03 at 11:00 +0000, john.gill@quadrics.com wrote:
> I'm investigating some performance issues with the SPARC
> and IA64 ports. I've included some sample code and the
> resulting assembler produced on both SPARC + IA64.
> In the function below, writec; fp->length is loaded
> twice causing a fairly expensive stall for load data
> in the processor pipeline. See the code.c below.
>
>
> But why doesn't gcc recognise that fp->Length is already
> kept in a register? Is this down to pointer aliasing?
Most likely, yes
GCC isn't very good at disambiguating pointers to structures.
I'm working on this, and hopefully in a few months it will be much
better.