projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40c67b5
)
Added an assert to the PBQP allocator to catch infinite cost solutions which might...
author
Lang Hames
<lhames@gmail.com>
Sun, 15 Nov 2009 04:39:51 +0000
(
04:39
+0000)
committer
Lang Hames
<lhames@gmail.com>
Sun, 15 Nov 2009 04:39:51 +0000
(
04:39
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88829
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/RegAllocPBQP.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/RegAllocPBQP.cpp
b/lib/CodeGen/RegAllocPBQP.cpp
index 5757e475546949b0747badc1378e57295acc5a17..c677d341bef9f88689fc7ffb06066bb0da30fdbd 100644
(file)
--- a/
lib/CodeGen/RegAllocPBQP.cpp
+++ b/
lib/CodeGen/RegAllocPBQP.cpp
@@
-693,6
+693,11
@@
void PBQPRegAlloc::addStackInterval(const LiveInterval *spilled,
}
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
bool anotherRoundNeeded = false;