From 0ceeb42c9701d995267a04899b3a6acfceb8fb9e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 22 Oct 2002 23:34:11 +0000 Subject: [PATCH] Ensure definate initialization git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegAlloc/RegClass.cpp | 2 +- lib/Target/SparcV9/RegAlloc/RegClass.cpp | 2 +- lib/Transforms/LevelRaise.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/RegAlloc/RegClass.cpp b/lib/CodeGen/RegAlloc/RegClass.cpp index b92b70997ba..788921ba019 100644 --- a/lib/CodeGen/RegAlloc/RegClass.cpp +++ b/lib/CodeGen/RegAlloc/RegClass.cpp @@ -158,7 +158,7 @@ IGNode * RegClass::getIGNodeWithMinSpillCost() { unsigned int IGNodeListSize = IG.getIGNodeList().size(); - double MinSpillCost; + double MinSpillCost = 0; IGNode *MinCostIGNode = NULL; bool isFirstNode = true; diff --git a/lib/Target/SparcV9/RegAlloc/RegClass.cpp b/lib/Target/SparcV9/RegAlloc/RegClass.cpp index b92b70997ba..788921ba019 100644 --- a/lib/Target/SparcV9/RegAlloc/RegClass.cpp +++ b/lib/Target/SparcV9/RegAlloc/RegClass.cpp @@ -158,7 +158,7 @@ IGNode * RegClass::getIGNodeWithMinSpillCost() { unsigned int IGNodeListSize = IG.getIGNodeList().size(); - double MinSpillCost; + double MinSpillCost = 0; IGNode *MinCostIGNode = NULL; bool isFirstNode = true; diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 6ea60059eae..84f57852cdc 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -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...