diff options
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc/IGNode.cpp')
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/IGNode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/IGNode.cpp b/lib/Target/SparcV9/RegAlloc/IGNode.cpp index 75007a0898..d8473d2370 100644 --- a/lib/Target/SparcV9/RegAlloc/IGNode.cpp +++ b/lib/Target/SparcV9/RegAlloc/IGNode.cpp @@ -15,9 +15,14 @@ IGNode::IGNode(LiveRange *const PLR, unsigned int Ind): Index(Ind), void IGNode::pushOnStack() // sets on to stack and { // reduce the degree of neighbors OnStack = true; - unsigned int neighs = AdjList.size(); + int neighs = AdjList.size(); - for(unsigned int i=0; i < neighs; i++) (AdjList[i])->decCurDegree(); + if( neighs < 0) { + cout << "\nAdj List size = " << neighs; + assert(0 && "Invalid adj list size"); + } + + for(int i=0; i < neighs; i++) (AdjList[i])->decCurDegree(); } |