aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-12-28 10:07:15 +0000
committerDuncan Sands <baldrick@free.fr>2010-12-28 10:07:15 +0000
commit2aea490e163b53e966d693285c17c1a934db5e8d (patch)
tree2f327f4e7342fc361c17a7357babacb595dcf7ce /lib/CodeGen/RegAllocGreedy.cpp
parent849ecb1431f878aeef2be8d08679a740e603e95a (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 54ccbf4a05..178d468c57 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -379,7 +379,7 @@ unsigned RAGreedy::trySpillInterferences(LiveInterval &VirtReg,
SmallVectorImpl<LiveInterval*> &NewVRegs) {
NamedRegionTimer T("Spill Interference", TimerGroupName, TimePassesIsEnabled);
unsigned BestPhys = 0;
- float BestWeight;
+ float BestWeight = 0;
Order.rewind();
while (unsigned PhysReg = Order.next()) {