diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2016-05-11 09:33:13 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2016-05-11 09:33:13 +0000 |
commit | 98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26 (patch) | |
tree | 657c8e39976aa859a7d94e2cef8b61ccbd529176 /gcc/cse.c | |
parent | ed29e24b8bae184e7f3f3e92afb57aa8767659be (diff) | |
download | gcc-98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26.zip gcc-98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26.tar.gz gcc-98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26.tar.bz2 |
re PR middle-end/70807 (fwprop pass ICE with incoming CDI_DOMINATORS)
gcc/
PR middle-end/70807
* cfgrtl.h (delete_insn_and_edges): Now return bool.
* cfgrtl.c (delete_insn_and_edges): Likewise.
* config/i386/i386.c (convert_scalars_to_vector): Remove
redundant code.
* cse.c (cse_insn): Compute cse_cfg_altered.
(delete_trivially_dead_insns): Likewise.
(cse_cc_succs): Likewise.
(rest_of_handle_cse): Free dominance info if required.
(rest_of_handle_cse2): Likewise.
(rest_of_handle_cse_after_global_opts): Likewise.
gcc/testsuite/
PR middle-end/70807
* gcc.dg/pr70807.c: New test.
From-SVN: r236114
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -5505,7 +5505,7 @@ cse_insn (rtx_insn *insn) else if (n_sets == 1 && dest == pc_rtx && src == pc_rtx) { /* One less use of the label this insn used to jump to. */ - delete_insn_and_edges (insn); + cse_cfg_altered |= delete_insn_and_edges (insn); cse_jumps_altered = true; /* No more processing for this set. */ sets[i].rtl = 0; @@ -5516,7 +5516,7 @@ cse_insn (rtx_insn *insn) { if (cfun->can_throw_non_call_exceptions && can_throw_internal (insn)) cse_cfg_altered = true; - delete_insn_and_edges (insn); + cse_cfg_altered |= delete_insn_and_edges (insn); /* No more processing for this set. */ sets[i].rtl = 0; } @@ -5551,7 +5551,7 @@ cse_insn (rtx_insn *insn) REG_NOTES (new_rtx) = note; } - delete_insn_and_edges (insn); + cse_cfg_altered |= delete_insn_and_edges (insn); insn = new_rtx; } else @@ -7131,7 +7131,7 @@ delete_trivially_dead_insns (rtx_insn *insns, int nreg) count_reg_usage (insn, counts, NULL_RTX, -1); ndead++; } - delete_insn_and_edges (insn); + cse_cfg_altered |= delete_insn_and_edges (insn); } } @@ -7427,7 +7427,7 @@ cse_cc_succs (basic_block bb, basic_block orig_bb, rtx cc_reg, rtx cc_src, newreg); } - delete_insn_and_edges (insns[i]); + cse_cfg_altered |= delete_insn_and_edges (insns[i]); } return mode; @@ -7568,6 +7568,9 @@ rest_of_handle_cse (void) else if (tem == 1 || optimize > 1) cleanup_cfg (0); + if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) + free_dominance_info (CDI_DOMINATORS); + return 0; } @@ -7637,6 +7640,9 @@ rest_of_handle_cse2 (void) else if (tem == 1) cleanup_cfg (0); + if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) + free_dominance_info (CDI_DOMINATORS); + cse_not_expected = 1; return 0; } @@ -7695,7 +7701,7 @@ rest_of_handle_cse_after_global_opts (void) rebuild_jump_labels (get_insns ()); tem = cse_main (get_insns (), max_reg_num ()); - purge_all_dead_edges (); + cse_cfg_altered |= purge_all_dead_edges (); delete_trivially_dead_insns (get_insns (), max_reg_num ()); cse_not_expected = !flag_rerun_cse_after_loop; @@ -7711,6 +7717,9 @@ rest_of_handle_cse_after_global_opts (void) else if (tem == 1) cleanup_cfg (0); + if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) + free_dominance_info (CDI_DOMINATORS); + flag_cse_follow_jumps = save_cfj; return 0; } |