Add an assertion.
[oota-llvm.git] / lib / CodeGen / LiveInterval.cpp
index 1834d6c01502f597a2b83ed202c1b19d82b89f79..0ca16007b2d4b6e20eb188cb8c4d0710c8483272 100644 (file)
 
 #include "llvm/CodeGen/LiveInterval.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/Target/MRegisterInfo.h"
 #include <algorithm>
-#include <iostream>
 #include <map>
+#include <ostream>
 using namespace llvm;
 
 // An example for liveAt():
@@ -289,7 +290,6 @@ void LiveInterval::join(LiveInterval &Other, int *LHSValNoAssignments,
   //
   // Also, if one range is a physreg and one is a vreg, we always merge from the
   // vreg into the physreg, which leaves the vreg intervals pristine.
-  unsigned OtherOffs = 1, ThisOffs = 0;
   if ((Other.ranges.size() > ranges.size() &&
       MRegisterInfo::isVirtualRegister(reg)) ||
       MRegisterInfo::isPhysicalRegister(Other.reg)) {
@@ -467,13 +467,12 @@ void LiveInterval::MergeValueNumberInto(unsigned V1, unsigned V2) {
   }
 }
 
-
 std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
   return os << '[' << LR.start << ',' << LR.end << ':' << LR.ValId << ")";
 }
 
 void LiveRange::dump() const {
-  std::cerr << *this << "\n";
+  cerr << *this << "\n";
 }
 
 void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
@@ -509,5 +508,10 @@ void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
 }
 
 void LiveInterval::dump() const {
-  std::cerr << *this << "\n";
+  cerr << *this << "\n";
+}
+
+
+void LiveRange::print(std::ostream &os) const {
+  os << *this;
 }