From 496770debc1681bfd8518d1f3d58611dce8b7a63 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 28 Dec 2010 10:07:15 +0000 Subject: [PATCH] Pacify the compiler. BestWeight cannot in fact be used uninitialized in this function, but the compiler was warning that it might be when doing a release build. llvm-svn: 122595 --- llvm/lib/CodeGen/RegAllocGreedy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 54ccbf4a0560..178d468c572c 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -379,7 +379,7 @@ unsigned RAGreedy::trySpillInterferences(LiveInterval &VirtReg, SmallVectorImpl &NewVRegs) { NamedRegionTimer T("Spill Interference", TimerGroupName, TimePassesIsEnabled); unsigned BestPhys = 0; - float BestWeight; + float BestWeight = 0; Order.rewind(); while (unsigned PhysReg = Order.next()) { -- GitLab