nv50/ir: Allow attaching two nodes when either one is already inside the graph.

This commit is contained in:
Francisco Jerez 2011-11-15 21:39:52 +01:00 committed by Christoph Bumiller
parent 099b81396e
commit 0056e1b988

View file

@ -116,11 +116,11 @@ void Graph::Node::attach(Node *node, Edge::Type kind)
++this->outCount; ++this->outCount;
++node->inCount; ++node->inCount;
assert(this->graph); assert(graph || node->graph);
if (!node->graph) { if (!node->graph)
node->graph = this->graph; graph->insert(node);
++node->graph->size; if (!graph)
} node->graph->insert(this);
if (kind == Edge::UNKNOWN) if (kind == Edge::UNKNOWN)
graph->classifyEdges(); graph->classifyEdges();