[pretty-ipa, committed] Allow TREE_ADDRESSABLE types to be IPA-SRAed

Martin Jambor mjambor@suse.cz
Tue Jun 16 13:13:00 GMT 2009


Hi,

this  is what is  required to  have TREE_ADDRESSABLE  types IPA-SRAed.
Bootstrapped and  tested on  x86_64-linux, committed to  pretty-ipa as
revision 148524.

Martin

2009-06-16  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c (find_param_candidates): Allow TREE_ADDRESSABLE types.
	* ipa-prop.c (ipa_modify_call_arguments): Make
	force_gimple_operand_gsi return a register or invariant only for
	gimple_reg_types.

Index: isra/gcc/tree-sra.c
===================================================================
--- isra.orig/gcc/tree-sra.c
+++ isra/gcc/tree-sra.c
@@ -2614,7 +2614,6 @@ find_param_candidates (void)
 	continue;
 
       if (!COMPLETE_TYPE_P (type)
-	  || TREE_ADDRESSABLE (type)
 	  || !host_integerp (TYPE_SIZE (type), 1)
           || tree_low_cst (TYPE_SIZE (type), 1) == 0)
 	continue;
Index: isra/gcc/ipa-prop.c
===================================================================
--- isra.orig/gcc/ipa-prop.c
+++ isra/gcc/ipa-prop.c
@@ -1632,8 +1632,10 @@ ipa_modify_call_arguments (struct cgraph
 	      if (!note->by_ref)
 		expr = fold_build1 (INDIRECT_REF, note->type, expr);
 	    }
-	  expr = force_gimple_operand_gsi (&gsi, expr, true, NULL, true,
-					   GSI_SAME_STMT);
+	  expr = force_gimple_operand_gsi (&gsi, expr,
+					   note->by_ref
+					   || is_gimple_reg_type (note->type),
+					   NULL, true, GSI_SAME_STMT);
 
 	  VEC_quick_push (tree, vargs, expr);
 	}



More information about the Gcc-patches mailing list