Fix tree-ssa-dce ICE in x86_64 Ada bootstrap

Jan Hubicka hubicka@ucw.cz
Mon Jul 20 01:04:00 GMT 2009


Hi,
my patch for SSA-DCE vops updating unfortunately shows another problem, in ADA bootstrap
remove_dead_phis runs across SSA names whose uses has been already removed from the
code and that was replaced by the VAR decls themselves and we get ICE in code propagating
abnormal PHIs.

Bootstrapped/regtested x86_64-linux, OK?

Honza

	* tree-ssa-dce.c (remove_dead_phis): Only look for abnormal PHIs
	when handling SSA name.
Index: tree-ssa-dce.c
===================================================================
*** tree-ssa-dce.c	(revision 149789)
--- tree-ssa-dce.c	(working copy)
*************** remove_dead_phis (basic_block bb)
*** 873,879 ****
  	      FOR_EACH_IMM_USE_STMT (use_stmt, iter, vdef)
  		FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
  		  SET_USE (use_p, vuse);
! 	      if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vdef))
  		SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 1;
  	    }
  	  else
--- 873,880 ----
  	      FOR_EACH_IMM_USE_STMT (use_stmt, iter, vdef)
  		FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
  		  SET_USE (use_p, vuse);
! 	      if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vdef)
! 	          && TREE_CODE (vuse) == SSA_NAME)
  		SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 1;
  	    }
  	  else



More information about the Gcc-patches mailing list