mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Matrix simplification in PBQP may push infinite costs onto register options.
The colorability heuristic should count these as denied registers. No test case - this exposed a bug on an out-of-tree target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
75e3b7fb8f
commit
d5be48a9db
@ -418,6 +418,12 @@ namespace PBQP {
|
|||||||
unsigned numRegs = getGraph().getNodeCosts(nItr).getLength() - 1;
|
unsigned numRegs = getGraph().getNodeCosts(nItr).getLength() - 1;
|
||||||
|
|
||||||
nd.numDenied = 0;
|
nd.numDenied = 0;
|
||||||
|
const Vector& nCosts = getGraph().getNodeCosts(nItr);
|
||||||
|
for (unsigned i = 1; i < nCosts.getLength(); ++i) {
|
||||||
|
if (nCosts[i] == std::numeric_limits<PBQPNum>::infinity())
|
||||||
|
++nd.numDenied;
|
||||||
|
}
|
||||||
|
|
||||||
nd.numSafe = numRegs;
|
nd.numSafe = numRegs;
|
||||||
nd.unsafeDegrees.resize(numRegs, 0);
|
nd.unsafeDegrees.resize(numRegs, 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user