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 2c64a140f513eb4de7f60e010896d0eb01a41c76..b1287001c37e18ca8a0865e305e94b9c5ab29c39 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()