This is the mail archive of the
mailing list for the GCC project.
Re: PR tree-opt/19484: noreturn vs. function pointer propagation
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Jan 2005 20:35:40 +0000
- Subject: Re: PR tree-opt/19484: noreturn vs. function pointer propagation
- References: <email@example.com> <20050123022254.GA13328@redhat.com>
Richard Henderson <firstname.lastname@example.org> writes:
> On Sat, Jan 22, 2005 at 10:08:48AM +0000, Richard Sandiford wrote:
>> (cleanup_control_flow): Remove fallthru edges from calls that are
>> now known not to return.
> We want similar cleanup for ECF_NOTHROW.
Isn't that already done by tree_purge_dead_eh_edges? E.g. DOM has:
/* If we simplified a statement in such a way as to be shown that it
cannot trap, update the eh information and the cfg to match. */
if (maybe_clean_eh_stmt (stmt))
bitmap_set_bit (need_eh_cleanup, bb->index);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Flagged to clear EH edges.\n");
/* Removal of statements may make some EH edges dead. Purge
such edges from the CFG as needed. */
if (!bitmap_empty_p (need_eh_cleanup))
cfg_altered |= tree_purge_all_dead_eh_edges (need_eh_cleanup);
I tried a simple testcase like:
extern void foo (void) __attribute__((nothrow));
void (*f) (void) = foo;
n = 1;
n = 2;
The EH edge was removed after DOM (and the catch was therefore
deleted as dead).