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]
Other format: [Raw text]

[PATCH] Allow IPA-SRA to pass (char *) as value on i686


Hi,

the patch below allows IPA-SRA to process scalar types for which
is_va_list_type() returns true.  The primary reason is to allow
processing (char *) parameters on i686 but even on the whole,
refraining from is_va_list_type types is there only to avoid
decomposing structures like alpha's va_list before the stdarg pass and
so applying the test on scalars is not necessary.

(The fact that IPA-SRA ignores char * is briefly discussed in bug
42375).

I'm currently re-bootstrapping and testing it on x86_64-linux, OK for
trunk if everything passes?

Thanks,

Martin

2010-04-06  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c (find_param_candidates): Allow scalar va_list types.

Index: mine/gcc/tree-sra.c
===================================================================
--- mine.orig/gcc/tree-sra.c
+++ mine/gcc/tree-sra.c
@@ -2991,7 +2991,7 @@ find_param_candidates (void)
 
       if (TREE_THIS_VOLATILE (parm)
 	  || TREE_ADDRESSABLE (parm)
-	  || is_va_list_type (type))
+	  || (!is_gimple_reg_type (type) && is_va_list_type (type)))
 	continue;
 
       if (is_unused_scalar_param (parm))


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