Ensure definate initialization
authorChris Lattner <sabre@nondot.org>
Tue, 22 Oct 2002 23:34:11 +0000 (23:34 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 22 Oct 2002 23:34:11 +0000 (23:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8

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

index b92b70997baa788bb0198f7c8376ed1d35d87f5a..788921ba019f0417be1dd9e99d57d4a1c3ab6871 100644 (file)
@@ -158,7 +158,7 @@ IGNode * RegClass::getIGNodeWithMinSpillCost()
 {
 
   unsigned int IGNodeListSize = IG.getIGNodeList().size(); 
-  double MinSpillCost;
+  double MinSpillCost = 0;
   IGNode *MinCostIGNode = NULL;
   bool isFirstNode = true;
 
index b92b70997baa788bb0198f7c8376ed1d35d87f5a..788921ba019f0417be1dd9e99d57d4a1c3ab6871 100644 (file)
@@ -158,7 +158,7 @@ IGNode * RegClass::getIGNodeWithMinSpillCost()
 {
 
   unsigned int IGNodeListSize = IG.getIGNodeList().size(); 
-  double MinSpillCost;
+  double MinSpillCost = 0;
   IGNode *MinCostIGNode = NULL;
   bool isFirstNode = true;
 
index 6ea60059eae45790fd72e5cf84deed0e98c9934f..84f57852cdcdee426f8341aeb4b881788526ffb0 100644 (file)
@@ -158,7 +158,7 @@ static bool PeepholeOptimizeAddCast(BasicBlock *BB, BasicBlock::iterator &BI,
                                     Value *AddOp1, CastInst *AddOp2) {
   const CompositeType *CompTy;
   Value *OffsetVal = AddOp2->getOperand(0);
-  Value *SrcPtr;  // Of type pointer to struct...
+  Value *SrcPtr = 0;  // Of type pointer to struct...
 
   if ((CompTy = getPointedToComposite(AddOp1->getType()))) {
     SrcPtr = AddOp1;                      // Handle the first case...