On Fri, Jun 15, 2012 at 6:48 PM, Eric Botcazou <ebotca...@adacore.com> wrote: >> Btw, I think we should enable this flag by default for all languages but >> Java so that if you enable -fnon-call-exceptions for C or C++ you don't get >> too many spurious exceptions from dead code. > > The attached patch enables it for the C family of languages (I'm not too sure > about the other languages). It also adds the missing bits related to inlining > (with the annoying FIXME for LTO in can_inline_edge_p). > > Bootstrapped/regtested on x86_64-suse-linux, OK for mainline?
Ok. Thanks, Richard. > > 2012-06-15 Eric Botcazou <ebotca...@adacore.com> > > PR middle-end/53590 > * doc/invoke.texi (-fdelete-dead-exceptions): Update. > * cif-code.def (DEAD_EXCEPTIONS): New code. > * ipa-inline.c (can_inline_edge_p): Return false if the caller can > delete dead exceptions but the callee cannot. > * tree-inline.c (initialize_cfun): Copy can_delete_dead_exceptions. > c-family/ > * c-opts.c (c_common_init_options_struct): Set > opts->x_flag_delete_dead_exceptions to 1. > > > -- > Eric Botcazou