re PR bootstrap/41395 (Revision 151800 failed bootstrap)
2009-10-01 Martin Jambor <mjambor@suse.cz> PR bootstrap/41395 * tree-sra.c (is_va_list_type): New function. (find_var_candidates): Call is_va_list_type. (find_param_candidates): Check that the type or the type pointed to are not va_list types. From-SVN: r152366
This commit is contained in:
parent
ed9fa13310
commit
1e9fb3de50
|
@ -1,3 +1,11 @@
|
||||||
|
2009-10-01 Martin Jambor <mjambor@suse.cz>
|
||||||
|
|
||||||
|
PR bootstrap/41395
|
||||||
|
* tree-sra.c (is_va_list_type): New function.
|
||||||
|
(find_var_candidates): Call is_va_list_type.
|
||||||
|
(find_param_candidates): Check that the type or the type pointed
|
||||||
|
to are not va_list types.
|
||||||
|
|
||||||
2009-10-01 Martin Jambor <mjambor@suse.cz>
|
2009-10-01 Martin Jambor <mjambor@suse.cz>
|
||||||
|
|
||||||
PR c++/41503
|
PR c++/41503
|
||||||
|
|
|
@ -1323,6 +1323,14 @@ build_ref_for_offset (tree *expr, tree type, HOST_WIDE_INT offset,
|
||||||
return build_ref_for_offset_1 (expr, type, offset, exp_type);
|
return build_ref_for_offset_1 (expr, type, offset, exp_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return true iff TYPE is stdarg va_list type. */
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
is_va_list_type (tree type)
|
||||||
|
{
|
||||||
|
return TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (va_list_type_node);
|
||||||
|
}
|
||||||
|
|
||||||
/* The very first phase of intraprocedural SRA. It marks in candidate_bitmap
|
/* The very first phase of intraprocedural SRA. It marks in candidate_bitmap
|
||||||
those with type which is suitable for scalarization. */
|
those with type which is suitable for scalarization. */
|
||||||
|
|
||||||
|
@ -1350,8 +1358,7 @@ find_var_candidates (void)
|
||||||
we also want to schedule it rather late. Thus we ignore it in
|
we also want to schedule it rather late. Thus we ignore it in
|
||||||
the early pass. */
|
the early pass. */
|
||||||
|| (sra_mode == SRA_MODE_EARLY_INTRA
|
|| (sra_mode == SRA_MODE_EARLY_INTRA
|
||||||
&& (TYPE_MAIN_VARIANT (TREE_TYPE (var))
|
&& is_va_list_type (type)))
|
||||||
== TYPE_MAIN_VARIANT (va_list_type_node))))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bitmap_set_bit (candidate_bitmap, DECL_UID (var));
|
bitmap_set_bit (candidate_bitmap, DECL_UID (var));
|
||||||
|
@ -2731,11 +2738,13 @@ find_param_candidates (void)
|
||||||
parm;
|
parm;
|
||||||
parm = TREE_CHAIN (parm))
|
parm = TREE_CHAIN (parm))
|
||||||
{
|
{
|
||||||
tree type;
|
tree type = TREE_TYPE (parm);
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
if (TREE_THIS_VOLATILE (parm)
|
if (TREE_THIS_VOLATILE (parm)
|
||||||
|| TREE_ADDRESSABLE (parm))
|
|| TREE_ADDRESSABLE (parm)
|
||||||
|
|| is_va_list_type (type))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (is_unused_scalar_param (parm))
|
if (is_unused_scalar_param (parm))
|
||||||
|
@ -2744,7 +2753,6 @@ find_param_candidates (void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = TREE_TYPE (parm);
|
|
||||||
if (POINTER_TYPE_P (type))
|
if (POINTER_TYPE_P (type))
|
||||||
{
|
{
|
||||||
type = TREE_TYPE (type);
|
type = TREE_TYPE (type);
|
||||||
|
@ -2752,6 +2760,7 @@ find_param_candidates (void)
|
||||||
if (TREE_CODE (type) == FUNCTION_TYPE
|
if (TREE_CODE (type) == FUNCTION_TYPE
|
||||||
|| TYPE_VOLATILE (type)
|
|| TYPE_VOLATILE (type)
|
||||||
|| !is_gimple_reg (parm)
|
|| !is_gimple_reg (parm)
|
||||||
|
|| is_va_list_type (type)
|
||||||
|| ptr_parm_has_direct_uses (parm))
|
|| ptr_parm_has_direct_uses (parm))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue