find_mem_givs SMALL_REGISTER_CLASSES patch

John Wehle john@feith.com
Sat Jun 27 19:04:00 GMT 1998


This patch seems to improve the i386 performance of the recent
FP benchmark posted to egcs by about 25%.  The call to memory_address_p
is to handle find_mem_givs being called with an expression which
isn't a valid memory reference for the machine, in which case it
might as well record the giv.  I'm not sure if this is a useful
theory ... hopefully someone with more knowledge will comment. :-)

ChangeLog:

Sat Jun 27 20:29:54 EDT 1998  John Wehle  (john@feith.com)

	* loop.c (find_mem_givs): Don't record a valid memory reference
	as a giv if SMALL_REGISTER_CLASSES is in effect.

Enjoy!

-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/loop.c.ORIGINAL	Fri Jun 19 19:37:01 1998
--- gcc/loop.c	Sat Jun 27 20:45:41 1998
***************
*** 4547,4553 ****
  
  	/* Don't make a DEST_ADDR giv with mult_val == 1 && add_val == 0.
  	   Such a giv isn't useful.  */
! 	if (benefit > 0 && (mult_val != const1_rtx || add_val != const0_rtx))
  	  {
  	    /* Found one; record it.  */
  	    struct induction *v
--- 4547,4555 ----
  
  	/* Don't make a DEST_ADDR giv with mult_val == 1 && add_val == 0.
  	   Such a giv isn't useful.  */
! 	if (benefit > 0 && (mult_val != const1_rtx || add_val != const0_rtx)
! 	    && !(SMALL_REGISTER_CLASSES
! 		 && memory_address_p (GET_MODE (x), XEXP(x, 0))))
  	  {
  	    /* Found one; record it.  */
  	    struct induction *v
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------




More information about the Gcc-patches mailing list