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]

obvious reg-stack tweek


Hi,
I've tested (i586) and commited the attached patch as obvious.
While cleaning up the condition, as suggested by Richard I've managed to
introduce bug making frequencies to be ignored in many cases.

Honza

Tue Jul 31 15:37:35 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* reg-stack (convert_regs_1): Fix best edge condition.

Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reg-stack.c,v
retrieving revision 1.84
diff -c -3 -p -r1.84 reg-stack.c
*** reg-stack.c	2001/07/30 20:30:21	1.84
--- reg-stack.c	2001/07/31 13:37:30
*************** convert_regs_1 (file, block)
*** 2630,2635 ****
--- 2630,2637 ----
  	beste = e;
        else if (EDGE_FREQUENCY (beste) < EDGE_FREQUENCY (e))
  	beste = e;
+       else if (EDGE_FREQUENCY (beste) > EDGE_FREQUENCY (e))
+ 	;
        else if (beste->count < e->count)
  	beste = e;
        else if (beste->count > e->count)


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