#include "llvm/Target/MRegisterInfo.h"
#include <algorithm>
#include <map>
+#include <ostream>
using namespace llvm;
// An example for liveAt():
ValueNumberInfo.clear();
ValueNumberInfo.append(NewValueNumberInfo.begin(), NewValueNumberInfo.end());
weight += Other.weight;
+ if (Other.preference && !preference)
+ preference = Other.preference;
}
/// MergeRangesInAsValue - Merge all of the intervals in RHS into this live
}
}
+unsigned LiveInterval::getSize() const {
+ unsigned Sum = 0;
+ for (const_iterator I = begin(), E = end(); I != E; ++I)
+ Sum += I->end - I->start;
+ return Sum;
+}
+
std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
return os << '[' << LR.start << ',' << LR.end << ':' << LR.ValId << ")";
}
cerr << *this << "\n";
}
-void LiveInterval::print(OStream OS, const MRegisterInfo *MRI) const {
+void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
if (MRI && MRegisterInfo::isPhysicalRegister(reg))
OS << MRI->getName(reg);
else
void LiveInterval::dump() const {
cerr << *this << "\n";
}
+
+
+void LiveRange::print(std::ostream &os) const {
+ os << *this;
+}