Verify dominators in early-out calculate_dominance_info
authorTom de Vries <tom@codesourcery.com>
Mon, 22 Jun 2015 16:26:00 +0000 (16:26 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 22 Jun 2015 16:26:00 +0000 (16:26 +0000)
2015-06-22  Tom de Vries  <tom@codesourcery.com>

* dominance.c (calculate_dominance_info): Verify dominators if
early-out.

From-SVN: r224744

gcc/ChangeLog
gcc/dominance.c

index 0b3ea81c7d3c88e79d4940a5a80b0ebf05c4ad42..0817d2444cb289992d1d83dccd36649b79af6976 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-22  Tom de Vries  <tom@codesourcery.com>
+
+       * dominance.c (calculate_dominance_info): Verify dominators if
+       early-out.
+
 2015-06-22  Marek Polacek  <polacek@redhat.com>
 
        * match.pd ((x ^ y) ^ (x | y) -> x & y,
index a9e042ef4b56b849c4c05febee39ad2e0d9c0adc..9c66ca234f9e234fda43d3757b3241fa5260cc12 100644 (file)
@@ -646,7 +646,12 @@ calculate_dominance_info (enum cdi_direction dir)
   bool reverse = (dir == CDI_POST_DOMINATORS) ? true : false;
 
   if (dom_computed[dir_index] == DOM_OK)
-    return;
+    {
+#if ENABLE_CHECKING
+      verify_dominators (CDI_DOMINATORS);
+#endif
+      return;
+    }
 
   timevar_push (TV_DOMINANCE);
   if (!dom_info_available_p (dir))