diff options
author | Richard Henderson <rth@redhat.com> | 2001-03-28 00:08:43 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-03-28 00:08:43 -0800 |
commit | a614d82edd24333543e450463072746459f53c3b (patch) | |
tree | f003f4f70a51a8c124a91b45763a9bc062930200 | |
parent | 7cc8342c7785ce983d7fc742aaeab84e16d485c8 (diff) | |
download | gcc-a614d82edd24333543e450463072746459f53c3b.zip gcc-a614d82edd24333543e450463072746459f53c3b.tar.gz gcc-a614d82edd24333543e450463072746459f53c3b.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/regmove.c | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eca76ca..8994dd2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 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. (expand_decl_cleanup_no_eh): Remove dead code. diff --git a/gcc/regmove.c b/gcc/regmove.c index 262338f..26c4546 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -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 an EH region or if there are nonlocal gotos. Note that this test is very conservative. */ - return flag_exceptions || nonlocal_goto_handler_labels; - + if (nonlocal_goto_handler_labels) + return 1; + /* FALLTHRU */ default: - /* All others never end a basic block. */ - return 0; + return can_throw_internal (insn); } } @@ -1062,6 +1062,11 @@ regmove_optimize (f, nregs, regmove_dump_file) int i; 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 can supress some optimizations in those zones. */ mark_flags_life_zones (discover_flags_reg ()); |