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]

[PATCH] Fix PR80113


The following fixes dangling SSA names running havoc with 
"simple" out-of-SSA coalescing.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2017-03-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80113
	* graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
	allocate extra SSA name for PHI def.
	(add_close_phis_to_outer_loops): Likewise.
	(add_close_phis_to_merge_points): Likewise.
	(copy_loop_close_phi_args): Likewise.
	(copy_cond_phi_nodes): Likewise.

Index: gcc/graphite-isl-ast-to-gimple.c
===================================================================
--- gcc/graphite-isl-ast-to-gimple.c	(revision 246224)
+++ gcc/graphite-isl-ast-to-gimple.c	(working copy)
@@ -1891,7 +1891,7 @@ copy_loop_phi_nodes (basic_block bb, bas
       if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
 	continue;
 
-      gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+      gphi *new_phi = create_phi_node (NULL_TREE, new_bb);
       tree new_res = create_new_def_for (res, new_phi,
 					 gimple_phi_result_ptr (new_phi));
       set_rename (res, new_res);
@@ -1991,7 +1991,7 @@ add_close_phis_to_outer_loops (tree last
   if (!bb_contains_loop_close_phi_nodes (bb) || !single_succ_p (bb))
     bb = split_edge (e);
 
-  gphi *close_phi = create_phi_node (SSA_NAME_VAR (last_merge_name), bb);
+  gphi *close_phi = create_phi_node (NULL_TREE, bb);
   tree res = create_new_def_for (last_merge_name, close_phi,
 				 gimple_phi_result_ptr (close_phi));
   set_rename (old_close_phi_name, res);
@@ -2036,7 +2036,7 @@ add_close_phis_to_merge_points (gphi *ol
       last_merge_name = add_close_phis_to_outer_loops (last_merge_name, merge_e,
 						       old_close_phi);
 
-      gphi *merge_phi = create_phi_node (SSA_NAME_VAR (old_close_phi_name), new_merge_bb);
+      gphi *merge_phi = create_phi_node (NULL_TREE, new_merge_bb);
       tree merge_res = create_new_def_for (old_close_phi_name, merge_phi,
 					   gimple_phi_result_ptr (merge_phi));
       set_rename (old_close_phi_name, merge_res);
@@ -2089,7 +2089,7 @@ copy_loop_close_phi_args (basic_block ol
 	/* Loop close phi nodes should not be scev_analyzable_p.  */
 	gcc_unreachable ();
 
-      gphi *new_close_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+      gphi *new_close_phi = create_phi_node (NULL_TREE, new_bb);
       tree new_res = create_new_def_for (res, new_close_phi,
 					 gimple_phi_result_ptr (new_close_phi));
       set_rename (res, new_res);
@@ -2472,7 +2472,7 @@ copy_cond_phi_nodes (basic_block bb, bas
       if (virtual_operand_p (res))
 	continue;
 
-      gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+      gphi *new_phi = create_phi_node (NULL_TREE, new_bb);
       tree new_res = create_new_def_for (res, new_phi,
 					 gimple_phi_result_ptr (new_phi));
       set_rename (res, new_res);


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