[PATCH][alias-improvements] Cleanup VOP renaming

Richard Guenther rguenther@suse.de
Fri Jan 30 08:35:00 GMT 2009


This is the first patch in a series to remove some fixmes from the
early days of the branch.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the
branch.

Richard.

2009-01-30  Richard Guenther  <rguenther@suse.de>

	* tree-inline.c (remap_gimple_stmt): Clear the copied vops.
	* tree-ssa-operands.c (finalize_ssa_defs): Always correctly
	remove defs.

Index: alias-improvements/gcc/tree-inline.c
===================================================================
--- alias-improvements.orig/gcc/tree-inline.c	2009-01-29 17:16:49.000000000 +0100
+++ alias-improvements/gcc/tree-inline.c	2009-01-29 17:49:28.000000000 +0100
@@ -1227,6 +1227,14 @@ remap_gimple_stmt (gimple stmt, copy_bod
   else
     walk_gimple_op (copy, remap_gimple_op_r, &wi); 
 
+  /* Clear the copied virtual operands.  We are not remapping them here
+     but are going to recreate them from scratch.  */
+  if (gimple_has_mem_ops (copy))
+    {
+      gimple_set_vdef (copy, NULL_TREE);
+      gimple_set_vuse (copy, NULL_TREE);
+    }
+
   /* We have to handle EH region remapping of GIMPLE_RESX specially because
      the region number is not an operand.  */
   if (gimple_code (stmt) == GIMPLE_RESX && id->eh_region_offset)
Index: alias-improvements/gcc/tree-ssa-operands.c
===================================================================
--- alias-improvements.orig/gcc/tree-ssa-operands.c	2009-01-28 16:26:59.000000000 +0100
+++ alias-improvements/gcc/tree-ssa-operands.c	2009-01-29 17:38:04.000000000 +0100
@@ -509,8 +509,7 @@ finalize_ssa_defs (gimple stmt)
   if (build_vdef == NULL_TREE
       && gimple_vdef (stmt) != NULL_TREE)
     {
-      if (gimple_vdef_op (stmt) != NULL_DEF_OPERAND_P
-	  && TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
+      if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
 	{
 	  unlink_stmt_vdef (stmt);
 	  release_ssa_name (gimple_vdef (stmt));



More information about the Gcc-patches mailing list