aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-11-02 13:18:32 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-11-02 13:18:32 +0000
commit54699c021d74f8422c187104012fed4557d9d78d (patch)
treeabaa1be5c85696330d85aa1caaa8ff1233fcbadd /gcc
parent641e7348d48fc0f5d97fa76cdde1325b9f75802c (diff)
downloadgcc-54699c021d74f8422c187104012fed4557d9d78d.zip
gcc-54699c021d74f8422c187104012fed4557d9d78d.tar.gz
gcc-54699c021d74f8422c187104012fed4557d9d78d.tar.bz2
tree-phinodes.c (remove_phi_arg_num): Do not zero the element that's being removed.
* tree-phinodes.c (remove_phi_arg_num): Do not zero the element that's being removed. From-SVN: r89984
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-phinodes.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ef00d11..1e1662a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
arguments using PENDING_STMT.
(thread_block): Call copy_phis_to_block after redirecting an
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index 89fbb3d..e7883e3 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -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)--;
}