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;
++node->inCount;
assert(this->graph);
if (!node->graph) {
node->graph = this->graph;
++node->graph->size;
}
assert(graph || node->graph);
if (!node->graph)
graph->insert(node);
if (!graph)
node->graph->insert(this);
if (kind == Edge::UNKNOWN)
graph->classifyEdges();