Patchwork [i386] : Trivial, use can_create_pseudo_p () some more

login
register
mail settings
Submitter Uros Bizjak
Date May 13, 2011, 10:20 a.m.
Message ID <BANLkTikwtLLmsNBVGgZhmWvGvZJ-vOOS_Q@mail.gmail.com>
Download mbox | patch
Permalink /patch/95454/
State New
Headers show

Comments

Uros Bizjak - May 13, 2011, 10:20 a.m.
Hello!

Use can_create_pseudo_p () for things that happen strictly before reload.

2011-05-13  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*movxf_internal): Use !can_create_pseudo ().
	(*movxf_internal_nointeger): Ditto.
	(*movdf_internal_rex64): Ditto.
	(*movdf_internal): Ditto.
	(*movdf_internal_nointeger): Ditto.
	(*movsf_internal): Ditto.
	(sincos splitters): Use can_create_pseudo ().

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.

Uros.

Patch

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md	(revision 173723)
+++ config/i386/i386.md	(working copy)
@@ -2866,7 +2866,7 @@ 
 	(match_operand:XF 1 "general_operand" "fm,f,G,roF,Fr"))]
   "optimize_function_for_speed_p (cfun)
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || memory_operand (operands[0], XFmode))"
 {
@@ -2895,7 +2895,7 @@ 
 	(match_operand:XF 1 "general_operand" "fm,f,G,*roF,F*r"))]
   "optimize_function_for_size_p (cfun)
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || standard_80387_constant_p (operands[1])
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || memory_operand (operands[0], XFmode))"
@@ -2938,7 +2938,7 @@ 
 	(match_operand:DF 1 "general_operand"
 		"fm,f,G,rm,r,F ,F ,C   ,Y2*x,m   ,Y2*x,r ,Yi"))]
   "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
            && optimize_function_for_size_p (cfun)
@@ -3102,7 +3102,7 @@ 
   "!TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
    && optimize_function_for_speed_p (cfun)
    && TARGET_INTEGER_DFMODE_MOVES
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
            && optimize_function_for_size_p (cfun)
@@ -3255,7 +3255,7 @@ 
   "!TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (optimize_function_for_size_p (cfun)
        || !TARGET_INTEGER_DFMODE_MOVES)
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
            && optimize_function_for_size_p (cfun)
@@ -3263,8 +3263,7 @@ 
 	   && standard_80387_constant_p (operands[1]))
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || ((optimize_function_for_size_p (cfun)
-            || !TARGET_MEMORY_MISMATCH_STALL
-	    || reload_in_progress || reload_completed)
+            || !TARGET_MEMORY_MISMATCH_STALL)
  	   && memory_operand (operands[0], DFmode)))"
 {
   switch (which_alternative)
@@ -3420,7 +3419,7 @@ 
 	(match_operand:SF 1 "general_operand"
 	  "fm,f,G,rmF,Fr,C,x,xm,x,m  ,*y,*y ,r  ,Yi,r   ,*Ym"))]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
-   && (reload_in_progress || reload_completed
+   && (!can_create_pseudo_p ()
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || (!TARGET_SSE_MATH && optimize_function_for_size_p (cfun)
 	   && standard_80387_constant_p (operands[1]))
@@ -13525,7 +13524,7 @@ 
    (set (match_operand:XF 1 "register_operand" "")
 	(unspec:XF [(match_dup 2)] UNSPEC_SINCOS_SIN))]
   "find_regno_note (insn, REG_UNUSED, REGNO (operands[0]))
-   && !(reload_completed || reload_in_progress)"
+   && can_create_pseudo_p ()"
   [(set (match_dup 1) (unspec:XF [(match_dup 2)] UNSPEC_SIN))])
 
 (define_split
@@ -13535,7 +13534,7 @@ 
    (set (match_operand:XF 1 "register_operand" "")
 	(unspec:XF [(match_dup 2)] UNSPEC_SINCOS_SIN))]
   "find_regno_note (insn, REG_UNUSED, REGNO (operands[1]))
-   && !(reload_completed || reload_in_progress)"
+   && can_create_pseudo_p ()"
   [(set (match_dup 0) (unspec:XF [(match_dup 2)] UNSPEC_COS))])
 
 (define_insn "sincos_extend<mode>xf3_i387"
@@ -13561,7 +13560,7 @@ 
    (set (match_operand:XF 1 "register_operand" "")
 	(unspec:XF [(float_extend:XF (match_dup 2))] UNSPEC_SINCOS_SIN))]
   "find_regno_note (insn, REG_UNUSED, REGNO (operands[0]))
-   && !(reload_completed || reload_in_progress)"
+   && can_create_pseudo_p ()"
   [(set (match_dup 1)
 	(unspec:XF [(float_extend:XF (match_dup 2))] UNSPEC_SIN))])
 
@@ -13573,7 +13572,7 @@ 
    (set (match_operand:XF 1 "register_operand" "")
 	(unspec:XF [(float_extend:XF (match_dup 2))] UNSPEC_SINCOS_SIN))]
   "find_regno_note (insn, REG_UNUSED, REGNO (operands[1]))
-   && !(reload_completed || reload_in_progress)"
+   && can_create_pseudo_p ()"
   [(set (match_dup 0)
 	(unspec:XF [(float_extend:XF (match_dup 2))] UNSPEC_COS))])