Commit a614d82e by Richard Henderson Committed by Richard Henderson

regmove.c (perhaps_ends_bb_p): Use can_throw_internal to reduce false positives.

        * regmove.c (perhaps_ends_bb_p): Use can_throw_internal to
        reduce false positives.
        (regmove_optimize): Disable if flag_non_call_exceptions.

From-SVN: r40917
parent 7cc8342c
2001-03-27 Richard Henderson <rth@redhat.com> 2001-03-27 Richard Henderson <rth@redhat.com>
* regmove.c (perhaps_ends_bb_p): Use can_throw_internal to
reduce false positives.
(regmove_optimize): Disable if flag_non_call_exceptions.
* stmt.c (expand_return): Remove always true predicate. * stmt.c (expand_return): Remove always true predicate.
(expand_decl_cleanup_no_eh): Remove dead code. (expand_decl_cleanup_no_eh): Remove dead code.
......
...@@ -395,11 +395,11 @@ static int perhaps_ends_bb_p (insn) ...@@ -395,11 +395,11 @@ static int perhaps_ends_bb_p (insn)
/* A CALL_INSN might be the last insn of a basic block, if it is inside /* A CALL_INSN might be the last insn of a basic block, if it is inside
an EH region or if there are nonlocal gotos. Note that this test is an EH region or if there are nonlocal gotos. Note that this test is
very conservative. */ very conservative. */
return flag_exceptions || nonlocal_goto_handler_labels; if (nonlocal_goto_handler_labels)
return 1;
/* FALLTHRU */
default: default:
/* All others never end a basic block. */ return can_throw_internal (insn);
return 0;
} }
} }
...@@ -1062,6 +1062,11 @@ regmove_optimize (f, nregs, regmove_dump_file) ...@@ -1062,6 +1062,11 @@ regmove_optimize (f, nregs, regmove_dump_file)
int i; int i;
rtx copy_src, copy_dst; rtx copy_src, copy_dst;
/* ??? Hack. Regmove doesn't examine the CFG, and gets mightily
confused by non-call exceptions ending blocks. */
if (flag_non_call_exceptions)
return;
/* Find out where a potential flags register is live, and so that we /* Find out where a potential flags register is live, and so that we
can supress some optimizations in those zones. */ can supress some optimizations in those zones. */
mark_flags_life_zones (discover_flags_reg ()); mark_flags_life_zones (discover_flags_reg ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment