summaryrefslogtreecommitdiff
path: root/gcc/cfganal.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfganal.c')
-rw-r--r--gcc/cfganal.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 58745d0ff09..cec33eceb59 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -762,14 +762,8 @@ flow_depth_first_order_compute (int *dfs_order, int *rc_order)
free (stack);
sbitmap_free (visited);
- /* The number of nodes visited should not be greater than
- n_basic_blocks. */
- if (dfsnum > n_basic_blocks)
- abort ();
-
- /* There are some nodes left in the CFG that are unreachable. */
- if (dfsnum < n_basic_blocks)
- abort ();
+ /* The number of nodes visited should be the number of blocks. */
+ gcc_assert (dfsnum == n_basic_blocks);
return dfsnum;
}
@@ -1019,8 +1013,7 @@ dfs_enumerate_from (basic_block bb, int reverse,
for (e = lbb->pred; e; e = e->pred_next)
if (!(e->src->flags & BB_VISITED) && predicate (e->src, data))
{
- if (tv == rslt_max)
- abort ();
+ gcc_assert (tv != rslt_max);
rslt[tv++] = st[sp++] = e->src;
e->src->flags |= BB_VISITED;
}
@@ -1030,8 +1023,7 @@ dfs_enumerate_from (basic_block bb, int reverse,
for (e = lbb->succ; e; e = e->succ_next)
if (!(e->dest->flags & BB_VISITED) && predicate (e->dest, data))
{
- if (tv == rslt_max)
- abort ();
+ gcc_assert (tv != rslt_max);
rslt[tv++] = st[sp++] = e->dest;
e->dest->flags |= BB_VISITED;
}