remove a noop function.
[oota-llvm.git] / lib / CodeGen / CalcSpillWeights.cpp
index dcffb8a247a9f1873522c0621e19b439bdbe378a..b8ef219bf9c1d4a222172038c324ee6f91c01f6a 100644 (file)
@@ -37,7 +37,7 @@ void CalculateSpillWeights::getAnalysisUsage(AnalysisUsage &au) const {
 
 bool CalculateSpillWeights::runOnMachineFunction(MachineFunction &fn) {
 
-  DEBUG(errs() << "********** Compute Spill Weights **********\n"
+  DEBUG(dbgs() << "********** Compute Spill Weights **********\n"
                << "********** Function: "
                << fn.getFunction()->getName() << '\n');
 
@@ -95,7 +95,7 @@ bool CalculateSpillWeights::runOnMachineFunction(MachineFunction &fn) {
           SlotIndex defIdx = lis->getInstructionIndex(mi).getDefIndex();
           const LiveRange *dlr =
             lis->getInterval(reg).getLiveRangeContaining(defIdx);
-          if (dlr->end > mbbEnd)
+          if (dlr->end >= mbbEnd)
             weight *= 3.0F;
         }
         regInt.weight += weight;