tree-phinodes.c (remove_phi_arg_num): Do not zero the element that's being removed.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 2 Nov 2004 13:18:32 +0000 (13:18 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 2 Nov 2004 13:18:32 +0000 (13:18 +0000)
* tree-phinodes.c (remove_phi_arg_num): Do not zero the
element that's being removed.

From-SVN: r89984

gcc/ChangeLog
gcc/tree-phinodes.c

index ef00d117425fc192f3c2e81e19ec8cace3b9572c..1e1662aeb390bd237e5c885e5a6895fb459bfff0 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-02  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-phinodes.c (remove_phi_arg_num): Do not zero the
+       element that's being removed.
+
 2004-11-02  Kazu Hirata  <kazu@cs.umass.edu>
 
        * tree-ssa-threadupdate.c (copy_phis_to_block): Install PHI
index 89fbb3d88a716afb5301c8aeff60121844c37215..e7883e3951caa83239184f17e11e3f17576d06ef 100644 (file)
@@ -396,10 +396,10 @@ remove_phi_arg_num (tree phi, int i)
       PHI_ARG_NONZERO (phi, i) = PHI_ARG_NONZERO (phi, num_elem - 1);
     }
 
-  /* Shrink the vector and return.  */
-  SET_PHI_ARG_DEF (phi, num_elem - 1, NULL_TREE);
-  PHI_ARG_EDGE (phi, num_elem - 1) = NULL;
-  PHI_ARG_NONZERO (phi, num_elem - 1) = false;
+  /* Shrink the vector and return.  Note that we do not have to clear
+     PHI_ARG_DEF, PHI_ARG_EDGE, or PHI_ARG_NONZERO because the garbage
+     collector will not look at those elements beyond the first
+     PHI_NUM_ARGS elements of the array.  */
   PHI_NUM_ARGS (phi)--;
 }