summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-22 16:26:00 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-22 16:26:00 +0000
commita082866db76d04db4e9dd2d6af45a2f9c20d1fa9 (patch)
treef209b73811a869845b4cc857833ff99e9e1d6cb3
parent0744fd81c16fac8123936b120a196f04db67bbdc (diff)
downloadgcc-a082866db76d04db4e9dd2d6af45a2f9c20d1fa9.tar.gz
Verify dominators in early-out calculate_dominance_info
2015-06-22 Tom de Vries <tom@codesourcery.com> * dominance.c (calculate_dominance_info): Verify dominators if early-out. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224744 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dominance.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0b3ea81c7d3..0817d2444cb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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,
diff --git a/gcc/dominance.c b/gcc/dominance.c
index a9e042ef4b5..9c66ca234f9 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -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))