aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-06-15 09:22:00 +0000
committerEric Botcazou <ebotcazou@adacore.com>2012-06-15 09:22:00 +0000
commit89d7058c5ea71bfe46f1478cf9a114be3cae14bd (patch)
tree25c62c51c178ea6a10880eb537b869fdb857970d /gcc/function.h
parent6876fbe30fd34846829f74405225c6b5d34bc3b7 (diff)
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: https://gcc.gnu.org/svn/gcc/trunk@188651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r--gcc/function.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h
index c8357bf5ee0..f2fb099ea01 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -615,6 +615,10 @@ struct GTY(()) function {
exceptions. */
unsigned int can_throw_non_call_exceptions : 1;
+ /* Nonzero if instructions that may throw exceptions but don't otherwise
+ contribute to the execution of the program can be deleted. */
+ unsigned int can_delete_dead_exceptions : 1;
+
/* Fields below this point are not set for abstract functions; see
allocate_struct_function. */