only calculate dominance if CFG verification was fine to avoid crashs/endless loops
authorMatthias Braun <matze@braunis.de>
Fri, 29 Apr 2011 16:18:55 +0000 (18:18 +0200)
committerMatthias Braun <matze@braunis.de>
Mon, 2 May 2011 09:34:00 +0000 (11:34 +0200)
ir/ir/irverify.c

index fa278fa..46575cc 100644 (file)
@@ -2018,7 +2018,10 @@ int irg_verify(ir_graph *irg, unsigned flags)
        last_irg_error = NULL;
 #endif /* NDEBUG */
 
-       if ((flags & VERIFY_ENFORCE_SSA) && pinned)
+       if (!check_cfg(irg))
+               res = 0;
+
+       if (res == 1 && (flags & VERIFY_ENFORCE_SSA) && pinned)
                compute_doms(irg);
 
        irg_walk_anchors(
@@ -2029,9 +2032,6 @@ int irg_verify(ir_graph *irg, unsigned flags)
                &res
        );
 
-       if (!check_cfg(irg))
-               res = 0;
-
        if (get_node_verification_mode() == FIRM_VERIFICATION_REPORT && ! res) {
                ir_entity *ent = get_irg_entity(irg);