nv50/ir: make sure entire graph is reachable
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 2 Dec 2015 05:38:22 +0000 (00:38 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 2 Dec 2015 23:51:15 +0000 (18:51 -0500)
The algorithm expects the entire CFG to be reachable, so make sure that
we hit every node. Otherwise we will end up with uninitialized data,
memory corruption, etc.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_ssa.cpp

index 2e432349f24a1f13884e885411ed7f3c607289f5..9ea1065b80655ce31ef8397c185f72ca76401376 100644 (file)
@@ -87,6 +87,7 @@ DominatorTree::DominatorTree(Graph *cfgraph) : cfg(cfgraph),
       LABEL(i) = i;
       SEMI(i) = ANCESTOR(i) = -1;
    }
+   assert(i == count);
 
    build();