Bug fix: uninitialized variable.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Tue, 6 Nov 2001 05:11:05 +0000 (05:11 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Tue, 6 Nov 2001 05:11:05 +0000 (05:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1147 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAlloc/RegClass.cpp
lib/Target/SparcV9/RegAlloc/RegClass.cpp

index 9c3e08c294e7d1cc4fbbbb77b26dee2e8fb050e5..cb33b9e0fb76c60d941c2d8edeea96a027eb0698 100644 (file)
@@ -47,7 +47,7 @@ void RegClass::colorAllRegs()
 void RegClass::pushAllIGNodes()
 {
   bool NeedMoreSpills;          
-  IGNode *IGNodeSpill, *IGNode;
+  IGNode *IGNodeSpill;
 
   IG.setCurDegreeOfIGNodes();           // calculate degree of IGNodes
 
@@ -70,14 +70,14 @@ void RegClass::pushAllIGNodes()
 
   do{
 
-    //get IGNode with min spill cost
+    //get node with min spill cost
     IGNodeSpill = getIGNodeWithMinSpillCost(); 
 
-    //  push IGNode on to stack
+    //  push that node on to stack
     IGNodeStack.push( IGNodeSpill ); 
 
-    // set OnStack flag and decrement degree of neighs 
-    IGNode->pushOnStack(); 
+    // set its OnStack flag and decrement degree of neighs 
+    IGNodeSpill->pushOnStack(); 
    
     // now push NON-constrined ones, if any
     NeedMoreSpills = ! pushUnconstrainedIGNodes(); 
index 9c3e08c294e7d1cc4fbbbb77b26dee2e8fb050e5..cb33b9e0fb76c60d941c2d8edeea96a027eb0698 100644 (file)
@@ -47,7 +47,7 @@ void RegClass::colorAllRegs()
 void RegClass::pushAllIGNodes()
 {
   bool NeedMoreSpills;          
-  IGNode *IGNodeSpill, *IGNode;
+  IGNode *IGNodeSpill;
 
   IG.setCurDegreeOfIGNodes();           // calculate degree of IGNodes
 
@@ -70,14 +70,14 @@ void RegClass::pushAllIGNodes()
 
   do{
 
-    //get IGNode with min spill cost
+    //get node with min spill cost
     IGNodeSpill = getIGNodeWithMinSpillCost(); 
 
-    //  push IGNode on to stack
+    //  push that node on to stack
     IGNodeStack.push( IGNodeSpill ); 
 
-    // set OnStack flag and decrement degree of neighs 
-    IGNode->pushOnStack(); 
+    // set its OnStack flag and decrement degree of neighs 
+    IGNodeSpill->pushOnStack(); 
    
     // now push NON-constrined ones, if any
     NeedMoreSpills = ! pushUnconstrainedIGNodes();