const_elt; const_elt = const_elt->next_same_value)
if (REG_P (const_elt->exp))
{
- src_related = gen_lowpart (mode,
- const_elt->exp);
+ src_related = gen_lowpart (mode, const_elt->exp);
break;
}
}
larger_elt; larger_elt = larger_elt->next_same_value)
if (REG_P (larger_elt->exp))
{
- src_related = gen_lowpart (mode,
- larger_elt->exp);
+ src_related = gen_lowpart (mode, larger_elt->exp);
break;
}
validate_change (insn, &SET_SRC (sets[i].rtl), new, 1);
apply_change_group ();
- /* With non-call exceptions, if this was an insn that could
- trap, we may have made it non-throwing now. For example
- we may have replaced a load with a register. */
- if (flag_non_call_exceptions
- && insn == BB_END (BLOCK_FOR_INSN (insn)))
- purge_dead_edges (BLOCK_FOR_INSN (insn));
-
break;
}
Otherwise, DATA->path is filled and the function returns TRUE indicating
that a path to follow was found.
- If FOLLOW_JUMPS is false, the maximum path lenghth is 1 and the only
+ If FOLLOW_JUMPS is false, the maximum path length is 1 and the only
block in the path will be FIRST_BB. */
static bool
}
\f
+/* Return true if BB has exception handling successor edges. */
+
+static bool
+have_eh_succ_edges (basic_block bb)
+{
+ edge e;
+ edge_iterator ei;
+
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (e->flags & EDGE_EH)
+ return true;
+
+ return false;
+}
+
+\f
/* Scan to the end of the path described by DATA. Return an estimate of
the total number of SETs, and the lowest and highest insn CUID, of all
insns in the path. */
/* Make sure that libcalls don't span multiple basic blocks. */
gcc_assert (libcall_insn == NULL_RTX);
+ /* With non-call exceptions, we are not always able to update
+ the CFG properly inside cse_insn. So clean up possibly
+ redundant EH edges here. */
+ if (flag_non_call_exceptions && have_eh_succ_edges (bb))
+ purge_dead_edges (bb);
+
/* If we changed a conditional jump, we may have terminated
the path we are following. Check that by verifying that
the edge we would take still exists. If the edge does
INSN_CUID (insn) = ++i;
}
- /* Loop over basic blocks in DFS order,
+ /* Loop over basic blocks in reverse completion order (RPO),
excluding the ENTRY and EXIT blocks. */
n_blocks = pre_and_rev_post_order_compute (NULL, rc_order, false);
i = 0;
while (i < n_blocks)
{
- /* Find the first block in the DFS queue that we have not yet
+ /* Find the first block in the RPO queue that we have not yet
processed before. */
do
{
if (ebb_data.nsets == 0)
continue;
- /* Get a reasonable extimate for the maximum number of qty's
+ /* Get a reasonable estimate for the maximum number of qty's
needed for this path. For this, we take the number of sets
and multiply that by MAX_RECOG_OPERANDS. */
max_qty = ebb_data.nsets * MAX_RECOG_OPERANDS;
expecting CSE to be run. But always rerun it in a cheap mode. */
cse_not_expected = !flag_rerun_cse_after_loop && !flag_gcse;
- /* If there are dead edges to purge, we haven't properly updated
- the CFG incrementally. */
- gcc_assert (!purge_all_dead_edges ());
-
if (tem)
rebuild_jump_labels (get_insns ());
bypassed safely. */
cse_condition_code_reg ();
- /* If there are dead edges to purge, we haven't properly updated
- the CFG incrementally. */
- gcc_assert (!purge_all_dead_edges ());
-
delete_trivially_dead_insns (get_insns (), max_reg_num ());
if (tem)