re PR tree-optimization/71253 (ICE during loop distribution w/ -O2 -ftree-loop-distri...
authorRichard Biener <rguenther@suse.de>
Tue, 24 May 2016 12:40:01 +0000 (12:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 May 2016 12:40:01 +0000 (12:40 +0000)
commit30fd2977745d53f282d1560212e3bea07943a937
tree38872e66995c95e8cbb549b062945e2448f38ed6
parent37923729c5ab013459a7eeeba5ce53fca75759fe
re PR tree-optimization/71253 (ICE during loop distribution w/ -O2 -ftree-loop-distribution)

2016-05-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/71253
* cfganal.h (control_dependences): Make robust against edge
and BB removal.
(control_dependences::control_dependences): Remove edge_list argument.
(control_dependences::get_edge): Remove.
(control_dependences::get_edge_src): Add.
(control_dependences::get_edge_dest): Likewise.
(control_dependences::m_el): Make a vector of edge src/dest index.
* cfganal.c (control_dependences::find_control_dependence): Adjust.
(control_dependences::control_dependences): Likewise.
(control_dependences::~control_dependence): Likewise.
(control_dependences::get_edge): Remove.
(control_dependences::get_edge_src): Add.
(control_dependences::get_edge_dest): Likewise.
* tree-ssa-dce.c (mark_control_dependent_edges_necessary): Use
get_edge_src.
(perform_tree_ssa_dce): Adjust.
* tree-loop-distribution.c (create_edge_for_control_dependence): Use
get_edge_src.
(pass_loop_distribution::execute): Adjust.  Do loop destroying
conditional on changed.

* gcc.dg/torture/pr71253.c: New testcase.

From-SVN: r236636
gcc/ChangeLog
gcc/cfganal.c
gcc/cfganal.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr71253.c [new file with mode: 0644]
gcc/tree-loop-distribution.c
gcc/tree-ssa-dce.c