aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/RegAlloc/IGNode.cpp
diff options
context:
space:
mode:
authorRuchira Sasanka <sasanka@students.uiuc.edu>2001-11-03 22:01:09 +0000
committerRuchira Sasanka <sasanka@students.uiuc.edu>2001-11-03 22:01:09 +0000
commita9e45c8d66b84971973d94a0c28cad770eac7cc4 (patch)
treebc4418f9b2889942387e77f0bff8b83e21f10549 /lib/Target/SparcV9/RegAlloc/IGNode.cpp
parent081431a639196716fb4b5394db518e521f533ac4 (diff)
Added an assertion since it seems like AdjList returns an errornous size in method
IGNode::pushOnStack(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc/IGNode.cpp')
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.cpp9
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();
}