diff options
author | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-03 22:01:09 +0000 |
---|---|---|
committer | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-03 22:01:09 +0000 |
commit | 471babe2d2c96d139001a1830349523f8c4724a7 (patch) | |
tree | 5c4bc5d7cf94026580a0d7e49f0fa0f68ba7677b /llvm/lib/CodeGen/RegAlloc/IGNode.cpp | |
parent | 033324fc0c4f5f650b2adb968931d18cae29801d (diff) | |
download | bcm5719-llvm-471babe2d2c96d139001a1830349523f8c4724a7.tar.gz bcm5719-llvm-471babe2d2c96d139001a1830349523f8c4724a7.zip |
Added an assertion since it seems like AdjList returns an errornous size in method
IGNode::pushOnStack().
llvm-svn: 1116
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/IGNode.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAlloc/IGNode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/IGNode.cpp b/llvm/lib/CodeGen/RegAlloc/IGNode.cpp index 75007a0898b..d8473d2370b 100644 --- a/llvm/lib/CodeGen/RegAlloc/IGNode.cpp +++ b/llvm/lib/CodeGen/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(); } |