i965/cfg: Handle no-idom case in cfg_t::dump_domtree().
authorMatt Turner <mattst88@gmail.com>
Thu, 29 Oct 2015 04:11:46 +0000 (21:11 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 30 Oct 2015 00:51:16 +0000 (17:51 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_cfg.cpp

index 10bcd4b..5d46615 100644 (file)
@@ -528,7 +528,9 @@ cfg_t::dump_domtree()
 {
    printf("digraph DominanceTree {\n");
    foreach_block(block, this) {
-      printf("\t%d -> %d\n", block->idom->num, block->num);
+      if (block->idom) {
+         printf("\t%d -> %d\n", block->idom->num, block->num);
+      }
    }
    printf("}\n");
 }