summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-05 13:49:43 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-05 13:49:43 +0000
commitcbe92cbb287112fd0ff64f5569f7164c799f3e3d (patch)
treeafe2154c65a8f2e29991715f4bb5cb09f4853283 /gcc
parent1c128d269342c539be18e11cc226a2651061c82b (diff)
downloadgcc-cbe92cbb287112fd0ff64f5569f7164c799f3e3d.tar.gz
* predict.c (apply_return_prediction): Standardize PHI chain
walking. * tree-ssa.c (ssa_redirect_edge): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95930 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/predict.c11
-rw-r--r--gcc/tree-ssa.c6
3 files changed, 11 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bd96cf9a02c..6077f1a9bfb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
+
+ * predict.c (apply_return_prediction): Standardize PHI chain
+ walking.
+ * tree-ssa.c (ssa_redirect_edge): Likewise.
+
2005-03-05 Richard Sandiford <rsandifo@redhat.com>
* doc/invoke.texi: Document new MIPS -msym32 and -mno-sym32 options.
diff --git a/gcc/predict.c b/gcc/predict.c
index bf594acfc92..9a00f0bb15f 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -1207,14 +1207,9 @@ apply_return_prediction (int *heads)
|| !SSA_NAME_DEF_STMT (return_val)
|| TREE_CODE (SSA_NAME_DEF_STMT (return_val)) != PHI_NODE)
return;
- phi = SSA_NAME_DEF_STMT (return_val);
- while (phi)
- {
- tree next = PHI_CHAIN (phi);
- if (PHI_RESULT (phi) == return_val)
- break;
- phi = next;
- }
+ for (phi = SSA_NAME_DEF_STMT (return_val); phi; phi = PHI_CHAIN (phi))
+ if (PHI_RESULT (phi) == return_val)
+ break;
if (!phi)
return;
phi_num_args = PHI_NUM_ARGS (phi);
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 9346d6cf706..99b9627c207 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -53,15 +53,13 @@ Boston, MA 02111-1307, USA. */
edge
ssa_redirect_edge (edge e, basic_block dest)
{
- tree phi, next;
+ tree phi;
tree list = NULL, *last = &list;
tree src, dst, node;
/* Remove the appropriate PHI arguments in E's destination block. */
- for (phi = phi_nodes (e->dest); phi; phi = next)
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
- next = PHI_CHAIN (phi);
-
if (PHI_ARG_DEF (phi, e->dest_idx) == NULL_TREE)
continue;