This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mips branch alignment patch


  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]