summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2011-11-15 21:39:52 +0100
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:00 +0200
commit0056e1b9889ce9cdf3669e5ebc02638e5acc448e (patch)
tree471ae27661a223da4b4b614fb44ebac4f3538ebd /src
parent099b81396eb4518cc4de0393ceff1028c5bee2bd (diff)
nv50/ir: Allow attaching two nodes when either one is already inside the graph.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp
index b1287001c37..069dc485b6a 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp
@@ -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();