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]

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;


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