diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-15 09:22:00 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-15 09:22:00 +0000 |
commit | bc0dfc8d56508f3390307d85291503b954f2a17f (patch) | |
tree | 25c62c51c178ea6a10880eb537b869fdb857970d /gcc/lto-streamer-in.c | |
parent | 22e93a4482890176e74b1c9626f00ae7108f8fee (diff) | |
download | gcc-bc0dfc8d56508f3390307d85291503b954f2a17f.tar.gz |
PR middle-end/53590
* common.opt (-fdelete-dead-exceptions): New switch.
* doc/invoke.texi (Code Gen Options): Document it.
* cse.c (count_reg_usage) <CALL_INSN>: Use !insn_nothrow_p in lieu of
insn_could_throw_p predicate. Do not skip an insn that could throw
if dead exceptions can be deleted.
(insn_live_p): Likewise, do not return true in that case.
* dce.c (can_alter_cfg): New flag.
(deletable_insn_p): Do not return false for an insn that can throw if
the CFG can be altered and dead exceptions can be deleted.
(init_dce): Set can_alter_cfg to false for fast DCE, true otherwise.
* dse.c (scan_insn): Use !insn_nothrow_p in lieu of insn_could_throw_
predicate. Do not preserve an insn that could throw if dead exceptions
can be deleted.
* function.h (struct function): Add can_delete_dead_exceptions flag.
* function.c (allocate_struct_function): Set it.
* lto-streamer-in.c (input_struct_function_base): Stream it.
* lto-streamer-out.c (input_struct_function_base): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark a
statement that could throw as necessary if dead exceptions can be
deleted.
ada/
* gcc-interface/misc.c (gnat_init_options_struct): Set
opts->x_flag_delete_dead_exceptions to 1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r-- | gcc/lto-streamer-in.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index ddb91d8557c..98390940f12 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -803,6 +803,7 @@ input_struct_function_base (struct function *fn, struct data_in *data_in, fn->returns_pcc_struct = bp_unpack_value (&bp, 1); fn->returns_struct = bp_unpack_value (&bp, 1); fn->can_throw_non_call_exceptions = bp_unpack_value (&bp, 1); + fn->can_delete_dead_exceptions = bp_unpack_value (&bp, 1); fn->always_inline_functions_inlined = bp_unpack_value (&bp, 1); fn->after_inlining = bp_unpack_value (&bp, 1); fn->stdarg = bp_unpack_value (&bp, 1); |