This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mips branch alignment patch
- To: Gavin Romig-Koch <gavin at cygnus dot com>
- Subject: Re: mips branch alignment patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 24 Aug 1999 03:01:24 -0600
- cc: Geoff Keating <geoffk at ozemail dot com dot au>, wilson at cygnus dot com, egcs-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <14269.40639.188436.514753@cetus.cygnus.com>you write:
>
> > Wed Aug 11 20:52:26 1999 Geoffrey Keating <geoffk@cygnus.com>
> >
> > * config/mips/mips.h (LABEL_ALIGN): Align branches on
> > 64-bit boundary on 64-bit MIPS.
> >
> > * config/mips/mips.c (print_operand): New substitution, %~,
> > which aligns labels to LABEL_ALIGN.
> > * config/mips/mips.md (div_trap_normal): Use %~.
> > (div_trap_mips16): Likewise.
> > (abssi): Likewise.
> > (absdi2): Likewise.
> > (ffssi2): Likewise.
> > (ffsdi2): Likewise.
> > (ashldi3_internal): Likewise.
> > (ashrdi3_internal): Likewise.
> > (lshrdi3_internal): Likewise.
> > (casesi_internal): Likewise.
>
> Geoff,
>
> My comments here are based on intuition rather than actual knowledge.
> I could very well be wrong here, and would welcome correction.
> Most of what you've done here is fine, I just have a problem with how
> you've chosen to enable label alignment.
>
> I believe the primary reason for aligning labels is to improve cache
> performance. And that what alignment is correct for a particular cache
> depends on the characteristics of the cache involved (cache line size
> seems to be the important one here). And there is no standard (or even
> consistantly used convention) across mips processors for these
> characteristics (right?). So it doesn't make sense to unconditionaly
> align all labels based on TARGET_64BIT.
>
> Also, alignment of labels is a speed for space tradeoff (again right?),
> so not every user is going to want this turned on.
>
> If I'm right about all this, it would be better if alignment of labels
> was enabled by a compiler option, like Jeff Law's -malign-loops= option,
> for example.
I agree with Gavin.
Goeff -- there are changes to allow user specified alignments in Cygnus's
tree. My recommendation is to extract them and submit them to egcs. They
closely follow implementations done for other processors and should not be
controversial.
jeff