From: Francisco Jerez Date: Tue, 15 Nov 2011 20:39:22 +0000 (+0100) Subject: nv50/ir: Allow inserting isolated nodes to a graph. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=099b81396eb4518cc4de0393ceff1028c5bee2bd;p=mesa.git nv50/ir: Allow inserting isolated nodes to a graph. --- diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp index 2c64a140f51..b1287001c37 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp @@ -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()