summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-04 03:14:42 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-04 03:14:42 +0000
commit51d5ff28e6db7669c5db0cd35ea1614cab7bc85d (patch)
tree24ab184f1b7a44239d7c4f5beb0242e97089fd03 /gcc
parent156660d7b49908d2990e04b2bc6a5d04915cfd2c (diff)
downloadgcc-51d5ff28e6db7669c5db0cd35ea1614cab7bc85d.tar.gz
* gcse.c (bypass_block): Use find_edge wherever possible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gcse.c26
2 files changed, 10 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b6765aca02c..4faebd4e6d1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-04 Kazu Hirata <kazu@cs.umass.edu>
+
+ * gcse.c (bypass_block): Use find_edge wherever possible.
+
2005-03-03 Daniel Berlin <dberlin@dbrelin.org>
Fix PR debug/20253
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 456a857259f..d5927d15ee9 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -3581,16 +3581,11 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
}
else if (GET_CODE (new) == LABEL_REF)
{
- edge_iterator ei2;
-
dest = BLOCK_FOR_INSN (XEXP (new, 0));
/* Don't bypass edges containing instructions. */
- FOR_EACH_EDGE (edest, ei2, bb->succs)
- if (edest->dest == dest && edest->insns.r)
- {
- dest = NULL;
- break;
- }
+ edest = find_edge (bb, dest);
+ if (edest && edest->insns.r)
+ dest = NULL;
}
else
dest = NULL;
@@ -3599,18 +3594,9 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
branch. We would end up emitting the instruction on "both"
edges. */
- if (dest && setcc && !CC0_P (SET_DEST (PATTERN (setcc))))
- {
- edge e2;
- edge_iterator ei2;
-
- FOR_EACH_EDGE (e2, ei2, e->src->succs)
- if (e2->dest == dest)
- {
- dest = NULL;
- break;
- }
- }
+ if (dest && setcc && !CC0_P (SET_DEST (PATTERN (setcc)))
+ && find_edge (e->src, dest))
+ dest = NULL;
old_dest = e->dest;
if (dest != NULL