From 2da02156af964dbd197f19cbd7fea003a73aacb3 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 15 Jun 2012 09:22:00 +0000 Subject: re PR middle-end/53590 (compiler fails to generate SIMD instruction for FP division) PR middle-end/53590 * common.opt (-fdelete-dead-exceptions): New switch. * doc/invoke.texi (Code Gen Options): Document it. * cse.c (count_reg_usage) : 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. From-SVN: r188651 --- gcc/ada/gcc-interface/misc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 6d77dc8..baa44c9 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -167,6 +167,9 @@ gnat_init_options_struct (struct gcc_options *opts) { /* Uninitialized really means uninitialized in Ada. */ opts->x_flag_zero_initialized_in_bss = 0; + + /* We can delete dead instructions that may throw exceptions in Ada. */ + opts->x_flag_delete_dead_exceptions = 1; } /* Initialize for option processing. */ -- cgit v1.1