This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Inliner fix WRT abnormal PHIs
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Jan 2007 10:08:18 +0100
- Subject: Inliner fix WRT abnormal PHIs
Hi,
as noticed by Razya, constant propagating into PHI arguments across abnormal
edges promptly leads to ICE. This is reproduced by constant propagation.
I've regtested/bootstrapped this fix on i686 and will commit it as obvious shortly.
Honza
* tree-inline.c (setup_one_parameter): Do not propagate into abnormal
PHIs.
Index: tree-inline.c
===================================================================
*** tree-inline.c (revision 120621)
--- tree-inline.c (working copy)
*************** setup_one_parameter (copy_body_data *id,
*** 1339,1345 ****
represent multiple variables for purposes of debugging. */
if (gimple_in_ssa_p (cfun) && rhs && def && is_gimple_reg (p)
&& (TREE_CODE (rhs) == SSA_NAME
! || is_gimple_min_invariant (rhs)))
{
insert_decl_map (id, def, rhs);
return;
--- 1342,1349 ----
represent multiple variables for purposes of debugging. */
if (gimple_in_ssa_p (cfun) && rhs && def && is_gimple_reg (p)
&& (TREE_CODE (rhs) == SSA_NAME
! || is_gimple_min_invariant (rhs))
! && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def))
{
insert_decl_map (id, def, rhs);
return;