nv50/ir: Allow inserting isolated nodes to a graph.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 15 Nov 2011 20:39:22 +0000 (21:39 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 14 Apr 2012 19:54:00 +0000 (21:54 +0200)
src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp

index 2c64a14..b128700 100644 (file)
@@ -43,13 +43,11 @@ Graph::~Graph()
 
 void Graph::insert(Node *node)
 {
-   if (!root) {
+   if (!root)
       root = node;
-      size = 1;
-      node->graph = this;
-   } else {
-      root->attach(node, Edge::TREE);
-   }
+
+   node->graph = this;
+   size++;
 }
 
 void Graph::Edge::unlink()