[PATCH] Fix PR44393^W44684
Richard Guenther
rguenther@suse.de
Sun Jun 27 12:50:00 GMT 2010
On Sun, 27 Jun 2010, Richard Guenther wrote:
>
> My last fix caused some ICEs. So here we go making the thing
> safe again and avoid some bogus calls into ref_may_alias_p_1.
Err, that was the wrong patch and PR number.
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2010-06-26 Richard Guenther <rguenther@suse.de>
PR middle-end/44684
* tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
(stmt_may_clobber_ref_p_1): Do not bother to call the oracle
for register LHS. Or non-store assignments.
Index: gcc/tree-ssa-alias.c
===================================================================
*** gcc/tree-ssa-alias.c (revision 161435)
--- gcc/tree-ssa-alias.c (working copy)
*************** refs_may_alias_p_1 (ao_ref *ref1, ao_ref
*** 801,811 ****
--- 801,813 ----
alias_set_type set;
gcc_checking_assert ((!ref1->ref
+ || TREE_CODE (ref1->ref) == SSA_NAME
|| DECL_P (ref1->ref)
|| handled_component_p (ref1->ref)
|| INDIRECT_REF_P (ref1->ref)
|| TREE_CODE (ref1->ref) == TARGET_MEM_REF)
&& (!ref2->ref
+ || TREE_CODE (ref2->ref) == SSA_NAME
|| DECL_P (ref2->ref)
|| handled_component_p (ref2->ref)
|| INDIRECT_REF_P (ref2->ref)
*************** stmt_may_clobber_ref_p_1 (gimple stmt, a
*** 1409,1419 ****
return call_may_clobber_ref_p_1 (stmt, ref);
}
! else if (is_gimple_assign (stmt))
{
! ao_ref r;
! ao_ref_init (&r, gimple_assign_lhs (stmt));
! return refs_may_alias_p_1 (ref, &r, true);
}
else if (gimple_code (stmt) == GIMPLE_ASM)
return true;
--- 1411,1425 ----
return call_may_clobber_ref_p_1 (stmt, ref);
}
! else if (gimple_assign_single_p (stmt))
{
! tree lhs = gimple_assign_lhs (stmt);
! if (!is_gimple_reg (lhs))
! {
! ao_ref r;
! ao_ref_init (&r, gimple_assign_lhs (stmt));
! return refs_may_alias_p_1 (ref, &r, true);
! }
}
else if (gimple_code (stmt) == GIMPLE_ASM)
return true;
More information about the Gcc-patches
mailing list