diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-05 13:49:43 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-05 13:49:43 +0000 |
commit | cbe92cbb287112fd0ff64f5569f7164c799f3e3d (patch) | |
tree | afe2154c65a8f2e29991715f4bb5cb09f4853283 /gcc/predict.c | |
parent | 1c128d269342c539be18e11cc226a2651061c82b (diff) | |
download | gcc-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/predict.c')
-rw-r--r-- | gcc/predict.c | 11 |
1 files changed, 3 insertions, 8 deletions
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); |