patch to improve x86_adjust_cost

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Wed Apr 14 05:23:00 GMT 1999


Hi
Here is updated version.

Wed Apr 14 14:23:20 MET DST 1999 Jan Hubicka <hubicka@freesoft.cz>
	* i386.c (x86_adjust_cost): Agi stall takes 1 cycle on Pentium, fst
	requires value to be ready one extra cycle.

*** i386.c.old	Wed Apr 14 11:59:01 1999
--- i386.c	Wed Apr 14 13:59:17 1999
*************** x86_adjust_cost (insn, link, dep_insn, c
*** 5424,5430 ****
  	return 0;
  
        if (agi_dependent (insn, dep_insn))
! 	return 3;
  
        if (GET_CODE (insn) == INSN
  	  && GET_CODE (PATTERN (insn)) == SET
--- 5424,5430 ----
  	return 0;
  
        if (agi_dependent (insn, dep_insn))
! 	return cost ? cost + 1 : 2;
  
        if (GET_CODE (insn) == INSN
  	  && GET_CODE (PATTERN (insn)) == SET
*************** x86_adjust_cost (insn, link, dep_insn, c
*** 5435,5440 ****
--- 5435,5444 ----
  	return 0;
        break;
  
+       /* Stores stalls one cycle longer than other insns.  */
+       if (is_fp_insn (insn) && cost && is_fp_store (dep_insn))
+         cost++;
+ 
      case PROCESSOR_K6:
      default:
        if (!is_fp_dest (dep_insn))


More information about the Gcc-patches mailing list