Apply Chris' suggestions.

llvm-svn: 43069
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index e74f333..8a9eb3d 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
@@ -290,6 +290,7 @@
 
   // Add live-ins to every BB except for entry.
   MachineFunction::iterator EntryMBB = mf_->begin();
+  SmallVector<MachineBasicBlock*, 8> LiveInMBBs;
   for (LiveIntervals::iterator i = li_->begin(), e = li_->end(); i != e; ++i) {
     const LiveInterval &cur = i->second;
     unsigned Reg = 0;
@@ -302,11 +303,11 @@
     for (LiveInterval::Ranges::const_iterator I = cur.begin(), E = cur.end();
          I != E; ++I) {
       const LiveRange &LR = *I;
-      SmallVector<MachineBasicBlock*, 4> LiveInMBBs;
       if (li_->findLiveInMBBs(LR, LiveInMBBs)) {
         for (unsigned i = 0, e = LiveInMBBs.size(); i != e; ++i)
           if (LiveInMBBs[i] != EntryMBB)
             LiveInMBBs[i]->addLiveIn(Reg);
+        LiveInMBBs.clear();
       }
     }
   }