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]

tweak for recommended alignment for local i386 FP variables patch


This change slightly optimizes the case of assign_stack_temp_for_type
finding an exact match.  Clearing best_p allows code which would normally
execute to be skipped which is desirable since nothing useful is done
by this code when an exact match is found (nothing harmful is done either,
however it's unnecessary overhead).

Notes:

  1) This is an incremental change to "recommended alignment for local
     i386 FP variable patch (version 3)".

ChangeLog:

Sat Feb  6 16:01:42 EST 1999  John Wehle  (john@feith.com)

	* function.c (assign_stack_temp_for_type): Clear best_p
	when an exact match is found.

Enjoy!

-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/function.c.ORIGINAL	Fri Feb  5 00:02:18 1999
--- gcc/function.c	Sat Feb  6 15:57:16 1999
*************** assign_stack_temp_for_type (mode, size, 
*** 908,916 ****
  	&& (best_p == 0 || best_p->size > p->size
  	    || (best_p->size == p->size && best_p->align > p->align)))
        {
- 	best_p = p;
  	if (p->align == align && p->size == size)
! 	  break;
        }
  
    /* Make our best, if any, the one to use.  */
--- 908,919 ----
  	&& (best_p == 0 || best_p->size > p->size
  	    || (best_p->size == p->size && best_p->align > p->align)))
        {
  	if (p->align == align && p->size == size)
! 	  {
! 	    best_p = 0;
! 	    break;
! 	  }
! 	best_p = p;
        }
  
    /* Make our best, if any, the one to use.  */
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



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