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]

Less important follow-up patch to the MOVE_RATIO correction.



CC to egcs-patches since someone mentioned that they'd rather want to
see *all* (discussion on) patches to egcs here; even though this one
originally went to gcc-patches@gnu.org (intended for *both* trees - it
goes into the GNATS gcc-queue at
<URL:http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>).
 Jeff and Kenner picks it up when their load meters leave the red zone.

> Date: Sun, 30 Aug 1998 20:16:41 -0600
> From: Jeffrey A Law <law@hurl.cygnus.com>

> I'm going to go ahead and install your changes into egcs.  I eagerly
> await the remaining documentation cleanups.

I assume you refer only to the updating of the comments regarding
MOVE_RATIO in egcs.  The wording in tm.texi may need refreshing, but I
leave that to someone better in brief, technical English.

There is an unlikely possibility that you could also be referring to
some expected (but unspecified) cleanups of my "better bug-report
guiding" patches (unrelated to MOVE_RATIO) to the internal error
messages and the egcs FAQ.
 They're not checked in, and the only comments I received were from
Robert Lipe (although positive), so perhaps these patches were
considered low priority, or maybe lost in the final release battle.
 Refer to
<URL:http://www.cygnus.com/ml/egcs-patches/1998-Aug/0260.html>.
 If you want those patches cleaned up in any way, please tell.
IMHO they'd be helpful for egcs-1.1.1, but that's your call.

Here are some (all? find-grepped for MOVE_RATIO) comment-cleanups for
egcs regarding MOVE_RATIO.  They were not as many as I thought.
 I have not yet received comments from Kenner (or anybody else on
gcc2) regarding MOVE_RATIO, so I did not worry to check that they all
apply cleanly to gcc2, but they probably will.

Note that most targets had no MOVE_RATIO definition or no (incorrect)
comments about MOVE_RATIO, therefore no fixing needed.  The MOVE_RATIO
definitions in the ports may still be suboptimal compared to whatever
the authora wanted, but that's another issue.

Mon Sep  7 22:48:09 1998  Hans-Peter Nilsson  <hp@axis.se>

	* expr.c: Corrected comment about what MOVE_RATIO does.
	* config/alpha/alpha.h: Ditto.
	* config/1750a/1750a.h: Ditto.
	* config/clipper/clipper.h: Ditto.
	* config/i386/i386.h: Ditto.

Index: gcc/expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.94
diff -p -c -r1.94 expr.c
*** expr.c	1998/08/30 19:21:20	1.94
--- expr.c	1998/09/07 20:13:26
*************** static rtx do_store_flag	PROTO((tree, rt
*** 203,210 ****
  static char direct_load[NUM_MACHINE_MODES];
  static char direct_store[NUM_MACHINE_MODES];
  
! /* MOVE_RATIO is the number of move instructions that is better than
!    a block move.  */
  
  #ifndef MOVE_RATIO
  #if defined (HAVE_movstrqi) || defined (HAVE_movstrhi) || defined (HAVE_movstrsi) || defined (HAVE_movstrdi) || defined (HAVE_movstrti)
--- 203,210 ----
  static char direct_load[NUM_MACHINE_MODES];
  static char direct_store[NUM_MACHINE_MODES];
  
! /* If a memory-to-memory move would take MOVE_RATIO or more simple
!    move-instruction sequences, we will do a movstr or libcall instead.  */
  
  #ifndef MOVE_RATIO
  #if defined (HAVE_movstrqi) || defined (HAVE_movstrhi) || defined (HAVE_movstrsi) || defined (HAVE_movstrdi) || defined (HAVE_movstrti)
Index: gcc/config/1750a/1750a.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/1750a/1750a.h,v
retrieving revision 1.5
diff -p -c -r1.5 1750a.h
*** 1750a.h	1998/05/05 23:17:34	1.5
--- 1750a.h	1998/09/07 20:14:15
*************** enum reg_class { NO_REGS, R2, R0_1, INDE
*** 854,861 ****
     in one reasonably fast instruction.  */
  #define MOVE_MAX 65536
  
! /* MOVE_RATIO is the number of move instructions that is better than a
!    block move.  */
  #define MOVE_RATIO 4
  
  /* Define this if zero-extension is slow (more than one real instruction).  */
--- 854,861 ----
     in one reasonably fast instruction.  */
  #define MOVE_MAX 65536
  
! /* If a memory-to-memory move would take MOVE_RATIO or more simple
!    move-instruction pairs, we will do a movstr or libcall instead.  */
  #define MOVE_RATIO 4
  
  /* Define this if zero-extension is slow (more than one real instruction).  */
Index: gcc/config/alpha/alpha.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.46
diff -p -c -r1.46 alpha.h
*** alpha.h	1998/09/05 22:22:03	1.46
--- alpha.h	1998/09/07 20:14:30
*************** do {									\
*** 1586,1594 ****
  
  #define MOVE_MAX 8
  
! /* Controls how many units are moved by expr.c before resorting to movstr.
!    Without byte/word accesses, we want no more than one; with, several single
!    byte accesses are better.   */
  
  #define MOVE_RATIO  (TARGET_BWX ? 7 : 2)
  
--- 1586,1596 ----
  
  #define MOVE_MAX 8
  
! /* If a memory-to-memory move would take MOVE_RATIO or more simple
!    move-instruction pairs, we will do a movstr or libcall instead.
! 
!    Without byte/word accesses, we want no more than four instructions;
!    with, several single byte accesses are better.   */
  
  #define MOVE_RATIO  (TARGET_BWX ? 7 : 2)
  
Index: gcc/config/clipper/clipper.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/clipper/clipper.h,v
retrieving revision 1.3
diff -p -c -r1.3 clipper.h
*** clipper.h	1998/03/06 14:44:33	1.3
--- clipper.h	1998/09/07 20:14:59
*************** do									      \
*** 815,822 ****
     in one reasonably fast instruction.  */
  #define MOVE_MAX 4
  
! /* MOVE_RATIO is the number of move instructions that is better than a
!    block move.  Make this large on clipper, since the block move is very
     inefficient with small blocks, and the hard register needs of the
     block move require much reload work. */
  
--- 815,824 ----
     in one reasonably fast instruction.  */
  #define MOVE_MAX 4
  
! /* If a memory-to-memory move would take MOVE_RATIO or more simple
!    move-instruction pairs, we will do a movstr or libcall instead.
! 
!    Make this large on clipper, since the block move is very
     inefficient with small blocks, and the hard register needs of the
     block move require much reload work. */
  
Index: gcc/config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.33
diff -p -c -r1.33 i386.h
*** i386.h	1998/09/06 05:52:06	1.33
--- i386.h	1998/09/07 20:15:34
*************** while (0)
*** 1890,1899 ****
     in one reasonably fast instruction.  */
  #define MOVE_MAX 4
  
! /* The number of scalar move insns which should be generated instead
!    of a string move insn or a library call.  Increasing the value
!    will always make code faster, but eventually incurs high cost in
!    increased code size.
  
     If you don't define this, a reasonable default is used.
  
--- 1890,1899 ----
     in one reasonably fast instruction.  */
  #define MOVE_MAX 4
  
! /* If a memory-to-memory move would take MOVE_RATIO or more simple
!    move-instruction pairs, we will do a movstr or libcall instead.
!    Increasing the value will always make code faster, but eventually
!    incurs high cost in increased code size.
  
     If you don't define this, a reasonable default is used.
  

brgds, H-P
-- 
Hans-Peter Nilsson, Axis Communications AB, S - 223 70 LUND, SWEDEN
Hans-Peter.Nilsson@axis.se | Tel +46 462701867,2701800
Fax +46 46136130 | RFC 1855 compliance implemented; report loss of brain.


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