This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
mips branch alignment patch
- To: Geoff Keating <geoffk at ozemail dot com dot au>, wilson at cygnus dot com, law at cygnus dot com
- Subject: mips branch alignment patch
- From: Gavin Romig-Koch <gavin at cygnus dot com>
- Date: Fri, 20 Aug 1999 14:30:23 -0400 (EDT)
- Cc: egcs-patches at gcc dot gnu dot org
- References: <199908111230.WAA01109@gluttony.geoffk.wattle.id.au>
> 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.
-gavin...