mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 13:20:10 +01:00
nv50/ra: let simplify return an error and handle that
fixes a crash in the case simplify reports an error Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
f315c4f189
commit
d8bcd3ef37
1 changed files with 7 additions and 5 deletions
|
|
@ -771,7 +771,7 @@ private:
|
|||
bool coalesce(ArrayList&);
|
||||
bool doCoalesce(ArrayList&, unsigned int mask);
|
||||
void calculateSpillWeights();
|
||||
void simplify();
|
||||
bool simplify();
|
||||
bool selectRegisters();
|
||||
void cleanup(const bool success);
|
||||
|
||||
|
|
@ -1305,7 +1305,7 @@ GCRA::simplifyNode(RIG_Node *node)
|
|||
(node->degree < node->degreeLimit) ? "" : "(spill)");
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
GCRA::simplify()
|
||||
{
|
||||
for (;;) {
|
||||
|
|
@ -1330,11 +1330,11 @@ GCRA::simplify()
|
|||
}
|
||||
if (isinf(bestScore)) {
|
||||
ERROR("no viable spill candidates left\n");
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
simplifyNode(best);
|
||||
} else {
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1493,7 +1493,9 @@ GCRA::allocateRegisters(ArrayList& insns)
|
|||
|
||||
buildRIG(insns);
|
||||
calculateSpillWeights();
|
||||
simplify();
|
||||
ret = simplify();
|
||||
if (!ret)
|
||||
goto out;
|
||||
|
||||
ret = selectRegisters();
|
||||
if (!ret) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue