summaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2004-11-22 10:14:00 -0700
committerJeff Law <law@gcc.gnu.org>2004-11-22 10:14:00 -0700
commit9ff3d2dea058075c670842e6ae0ac47d4405f829 (patch)
treee3538ca20caef7bf1f7f387c46b84c91cda52be6 /gcc/cfgbuild.c
parent169c5767efa86cacdd6be4ac8cdc21b35f7cab5b (diff)
downloadgcc-9ff3d2dea058075c670842e6ae0ac47d4405f829.tar.gz
cfg.c (cached_make_edge): Use find_edge rather than an inlined variant.
* cfg.c (cached_make_edge): Use find_edge rather than an inlined variant. * cfgbuild.c (make_edges): Likewise. * cfghooks.c (can_duplicate_block_p): Likewise. * cfgloop.c (loop_latch_edge): Likewise. * cfgloopmanip.c (force_single_succ_latches): Likewise. * cfgrtl.c (rtl_flow_call_edges_add): Likewise. * predict.c (predict_loops, propagate_freq): Likewise. * tracer.c (tail_duplicate): Likewise. * tree-cfg.c (disband_implicit_edges): Likewise. (tree_forwarder_block_p, tree_flow_call_edges_add): Likewise. From-SVN: r91019
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index f5bf3e839cd..134a984fa76 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -271,7 +271,6 @@ make_edges (basic_block min, basic_block max, int update_p)
enum rtx_code code;
int force_fallthru = 0;
edge e;
- edge_iterator ei;
if (LABEL_P (BB_HEAD (bb))
&& LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
@@ -390,12 +389,10 @@ make_edges (basic_block min, basic_block max, int update_p)
/* Find out if we can drop through to the next block. */
insn = NEXT_INSN (insn);
- FOR_EACH_EDGE (e, ei, bb->succs)
- if (e->dest == EXIT_BLOCK_PTR && e->flags & EDGE_FALLTHRU)
- {
- insn = 0;
- break;
- }
+ e = find_edge (bb, EXIT_BLOCK_PTR);
+ if (e && e->flags & EDGE_FALLTHRU)
+ insn = NULL;
+
while (insn
&& NOTE_P (insn)
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)