#include "expr.h"
#include "toplev.h"
#include "timevar.h"
+#include "sbitmap.h"
static void make_edges (basic_block, basic_block, int);
static void make_label_edge (sbitmap, basic_block, rtx, int);
if (GET_CODE (PATTERN (insn)) == TRAP_IF
&& XEXP (PATTERN (insn), 0) == const1_rtx)
return true;
- if (!flag_non_call_exceptions)
+ if (!cfun->can_throw_non_call_exceptions)
return false;
break;
handler for this CALL_INSN. If we're handling non-call
exceptions then any insn can reach any of the active handlers.
Also mark the CALL_INSN as reaching any nonlocal goto handler. */
- else if (code == CALL_INSN || flag_non_call_exceptions)
+ else if (code == CALL_INSN || cfun->can_throw_non_call_exceptions)
{
/* Add any appropriate EH edges. */
rtl_make_eh_edge (edge_cache, bb, insn);
if (code == CODE_LABEL && LABEL_ALT_ENTRY_P (insn))
make_edge (ENTRY_BLOCK_PTR, bb, 0);
}
+ else if (code == BARRIER)
+ {
+ /* __builtin_unreachable () may cause a barrier to be emitted in
+ the middle of a BB. We need to split it in the same manner as
+ if the barrier were preceded by a control_flow_insn_p insn. */
+ if (!flow_transfer_insn)
+ flow_transfer_insn = prev_nonnote_insn_bb (insn);
+ }
if (control_flow_insn_p (insn))
flow_transfer_insn = insn;