mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
40c67b5832
commit
e98b4b0695
@ -693,6 +693,11 @@ void PBQPRegAlloc::addStackInterval(const LiveInterval *spilled,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) {
|
bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) {
|
||||||
|
|
||||||
|
// Assert that this is a valid solution to the regalloc problem.
|
||||||
|
assert(solution.getCost() != std::numeric_limits<PBQP::PBQPNum>::infinity() &&
|
||||||
|
"Invalid (infinite cost) solution for PBQP problem.");
|
||||||
|
|
||||||
// Set to true if we have any spills
|
// Set to true if we have any spills
|
||||||
bool anotherRoundNeeded = false;
|
bool anotherRoundNeeded = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user