aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-11-12 14:24:35 +0000
committerIlya Leoshkevich <iii@gcc.gnu.org>2019-11-12 14:24:35 +0000
commite2d3e85c877af1cdade1dbbb95955c31932caa87 (patch)
tree1f76b96a09d6c95ae8895c0b4d7a30b5f4d29a43 /gcc/cfgcleanup.c
parent41098a37444b69d7b3b3072fde52e2785bef7012 (diff)
downloadgcc-e2d3e85c877af1cdade1dbbb95955c31932caa87.zip
gcc-e2d3e85c877af1cdade1dbbb95955c31932caa87.tar.gz
gcc-e2d3e85c877af1cdade1dbbb95955c31932caa87.tar.bz2
Free dominance info at the beginning of pass_jump_after_combine
try_forward_edges does not update dominance info, and merge_blocks relies on it being up-to-date. In PR92430 stale dominance info makes merge_blocks produce a loop in the dominator tree, which in turn makes delete_basic_block loop forever. Fix by freeing dominance info at the beginning of cleanup_cfg. gcc/ChangeLog: 2019-11-12 Ilya Leoshkevich <iii@linux.ibm.com> PR rtl-optimization/92430 * cfgcleanup.c (pass_jump_after_combine::execute): Free dominance info at the beginning. gcc/testsuite/ChangeLog: 2019-11-12 Ilya Leoshkevich <iii@linux.ibm.com> PR rtl-optimization/92430 * gcc.dg/pr92430.c: New test (from Arseny Solokha). From-SVN: r278095
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 6539d93..7f38825 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -3311,6 +3311,8 @@ public:
unsigned int
pass_jump_after_combine::execute (function *)
{
+ /* Jump threading does not keep dominators up-to-date. */
+ free_dominance_info (CDI_DOMINATORS);
cleanup_cfg (flag_thread_jumps ? CLEANUP_THREADING : 0);
return 0;
}