Skip to contentSkip to conversation

nv50/ir: don't touch degree on physreg RIG nodes

PATCH In review Ilia Mirkin 1 participant 2 messages Jan 6, 2016 – Jan 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nv50/ir: don't touch degree on physreg RIG nodes

These nodes don't go through reduction, so we shouldn't be increasing their degrees.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91895

---

I would like to see a *bunch* of testing on this before merging it... RA-land is far from my expertise. However it does fix the shaders in the original bug and doesn't regress the few additional things that I tried.

 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +5 -3
index cd8c42c..f1ffcba 100644
@@ -1129,9 +1129,11 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask)
 void
 GCRA::RIG_Node::addInterference(RIG_Node *node)
 {
-   this->degree += relDegree[node->colors][colors];
-   node->degree += relDegree[colors][node->colors];
-
+   // don't add degree for physregs since they won't go through simplify()
+   if (this->reg < 0)
+      this->degree += relDegree[node->colors][colors];
+   if (node->reg < 0)
+      node->degree += relDegree[colors][node->colors];
    this->attach(node, Graph::Edge::CROSS);
 }
 
Signature · 6 lines
2.4.10

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
#1 lore raw

Withdrawn. This fix is bogus -- it doesn't actually fix the original issue! It's the result of me futzing a lot and a similar-but-different fix did change things around enough to fix the original issue but then proceeded to break other stuff. So... ignore.

Quoted 35 lines · Ilia Mirkin

These nodes don't go through reduction, so we shouldn't be increasing their degrees.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91895

---

I would like to see a *bunch* of testing on this before merging it... RA-land is far from my expertise. However it does fix the shaders in the original bug and doesn't regress the few additional things that I tried.

 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +5 -4
index cd8c42c..f1ffcba 100644
@@ -1129,9 +1129,11 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask)
 void
 GCRA::RIG_Node::addInterference(RIG_Node *node)
 {
-   this->degree += relDegree[node->colors][colors];
-   node->degree += relDegree[colors][node->colors];
-
+   // don't add degree for physregs since they won't go through simplify()
+   if (this->reg < 0)
+      this->degree += relDegree[node->colors][colors];
+   if (node->reg < 0)
+      node->degree += relDegree[colors][node->colors];
    this->attach(node, Graph::Edge::CROSS);
 }
 
--
Quoted 2 lines

2.4.10

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev