re PR rtl-optimization/88593 (cleanup_cfg may make cached dominance info stale)
authorRichard Biener <rguenther@suse.de>
Fri, 1 Feb 2019 08:07:35 +0000 (08:07 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 1 Feb 2019 08:07:35 +0000 (08:07 +0000)
2019-02-01  Richard Biener  <rguenth@suse.de>

PR rtl-optimization/88593
* mode-switching.c (optimize_mode_switching): Free dominators before
calling cleanup_cfg.

From-SVN: r268442

gcc/ChangeLog
gcc/mode-switching.c

index d4ee2a2754c644387bb935381331d43bd5240a11..6b3437fe7b071f4c06184169fc4d21068e3e851f 100644 (file)
@@ -1,3 +1,9 @@
+2019-02-01  Richard Biener  <rguenth@suse.de>
+
+       PR rtl-optimization/88593
+       * mode-switching.c (optimize_mode_switching): Free dominators before
+       calling cleanup_cfg.
+
 2019-02-01  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
        PR tree-optimization/88932
index ef6f6e1984c5044e28d1ba47c49c88b1f3e877e2..2ff21a400813f4be4cc2ae2dde651a4f02f40ec4 100644 (file)
@@ -856,7 +856,10 @@ optimize_mode_switching (void)
     commit_edge_insertions ();
 
   if (targetm.mode_switching.entry && targetm.mode_switching.exit)
-    cleanup_cfg (CLEANUP_NO_INSN_DEL);
+    {
+      free_dominance_info (CDI_DOMINATORS);
+      cleanup_cfg (CLEANUP_NO_INSN_DEL);
+    }
   else if (!need_commit && !emitted)
     return 0;