From f5eb5fd0d6e8d476d164c57d4c1ca1248e83c8ee Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 28 Mar 2002 13:25:21 +0100 Subject: rtlanal.c: Include flags.h * rtlanal.c: Include flags.h (may_trap_p): Do not mark FP operations if trapping if !flag_trapping_math * Makefile.in (rtlanal.o): Add dependency on flag.h * ifcvt.c (noce_operand_ok): Avoid the lameness. From-SVN: r51508 --- gcc/cfgcleanup.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/cfgcleanup.c') diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index a1d5c64..f31f168 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1467,6 +1467,7 @@ try_crossjump_bb (mode, bb) { edge e, e2, nexte2, nexte, fallthru; bool changed; + int n = 0; /* Nothing to do if there is not at least two incoming edges. */ if (!bb->pred || !bb->pred->pred_next) @@ -1475,9 +1476,13 @@ try_crossjump_bb (mode, bb) /* It is always cheapest to redirect a block that ends in a branch to a block that falls through into BB, as that adds no branches to the program. We'll try that combination first. */ - for (fallthru = bb->pred; fallthru; fallthru = fallthru->pred_next) - if (fallthru->flags & EDGE_FALLTHRU) - break; + for (fallthru = bb->pred; fallthru; fallthru = fallthru->pred_next, n++) + { + if (fallthru->flags & EDGE_FALLTHRU) + break; + if (n > 100) + return false; + } changed = false; for (e = bb->pred; e; e = nexte) -- cgit v1.1