Ilia Mirkin
2016-Jan-06 22:30 UTC
[Nouveau] [PATCH] 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 Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org> --- 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(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index cd8c42c..f1ffcba 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -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); } -- 2.4.10
Ilia Mirkin
2016-Jan-08 01:41 UTC
[Nouveau] [PATCH] nv50/ir: don't touch degree on physreg RIG nodes
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. On Wed, Jan 6, 2016 at 5:30 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:> 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 > Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> > Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org> > --- > > 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(-) > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp > index cd8c42c..f1ffcba 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp > @@ -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); > } > > -- > 2.4.10 >
Seemingly Similar Threads
- [PATCH v2] nv50/ir: Initialize all members of GCRA (trivial)
- [RFC PATCH] nv50/ir: allow spilling of def values for constrained MERGES/UNIONS
- [PATCH] nv50/ir: Initialize all members of GCRA (trivial)
- [PATCH] nv50/ir: use unordered_set instead of list to keep our instructions in uses
- [PATCH] nv50/ra: Only increment DefValue counter if we are going to spill