#include "flags.h"
#include "output.h"
#include "function.h"
-#include "except.h"
#include "toplev.h"
#include "recog.h"
-#include "insn-flags.h"
#include "expr.h"
#include "obstack.h"
taken = probability > REG_BR_PROB_BASE / 2;
/* Find the normal taken edge and the normal fallthru edge.
- Note that there may in fact be other edges due to
- asynchronous_exceptions. */
+
+ Note, conditional jumps with other side effects may not
+ be fully optimized. In this case it is possible for
+ the conditional jump to branch to the same location as
+ the fallthru path.
+
+ We should probably work to improve optimization of that
+ case; however, it seems silly not to also deal with such
+ problems here if they happen to occur. */
e_taken = e_fall = NULL;
for (e = bb->succ; e ; e = e->succ_next)
- if (e->flags & EDGE_FALLTHRU)
- e_fall = e;
- else if (! (e->flags & EDGE_EH))
- e_taken = e;
+ {
+ if (e->flags & EDGE_FALLTHRU)
+ e_fall = e;
+ if (! (e->flags & EDGE_EH))
+ e_taken = e;
+ }
next = (taken ? e_taken : e_fall)->dest;
}
if (n_basic_blocks <= 1)
return;
- /* We do not currently handle correct re-placement of EH notes.
- But that does not matter unless we intend to use them. */
- if (flag_exceptions && ! exceptions_via_longjmp)
- for (i = 0; i < n_basic_blocks; i++)
- {
- edge e;
- for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next)
- if (e->flags & EDGE_EH)
- return;
- }
-
for (i = 0; i < n_basic_blocks; i++)
BASIC_BLOCK (i)->aux = xcalloc (1, sizeof (struct reorder_block_def));