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]

no register renaming for i387


Hi,
register renaming together with scheduling increases amount of registers alive
at the moment, that increases amount of fxch instructions needed.  On
modern CPUs it is better to leave this job for on-chip scheduler and avoid
the decoding bootleneck caused by extra fxch instructions.

bootstrapped/regtested i686

Tue Aug  7 21:01:52 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* i386.h (HARD_REGNO_RENAME_OK): New macro.
Index: i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.196
diff -c -3 -p -r1.196 i386.h
*** i386.h	2001/08/06 16:38:17	1.196
--- i386.h	2001/08/07 19:00:23
*************** enum fp_cw_mode {FP_CW_STORED, FP_CW_UNI
*** 3186,3191 ****
--- 3186,3200 ----
     ? emit_i387_cw_initialization (assign_386_stack_local (HImode, 1),	\
  				  assign_386_stack_local (HImode, 2)), 0\
     : 0)
+ 
+ /* Avoid renaming of stack registers, as doing so in combination with
+    scheduling just increases amount of live registers at time and in
+    the turn amount of fxch instructions needed.
+ 
+    ??? Maybe Pentium chips benefits from renaming, someone can try...  */
+ 
+ #define HARD_REGNO_RENAME_OK(src,target)  \
+    ((src) < FIRST_STACK_REG || (src) > LAST_STACK_REG)
  
  
  /*


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