aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/LiveInterval.cpp16
-rw-r--r--lib/CodeGen/LiveStackAnalysis.cpp11
2 files changed, 8 insertions, 19 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 25edb27d82..805b6728f2 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -24,7 +24,6 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include <algorithm>
using namespace llvm;
@@ -816,9 +815,6 @@ void LiveInterval::ComputeJoinedWeight(const LiveInterval &Other) {
}
}
-std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
- return os << '[' << LR.start << ',' << LR.end << ':' << LR.valno->id << ")";
-}
raw_ostream& llvm::operator<<(raw_ostream& os, const LiveRange &LR) {
return os << '[' << LR.start << ',' << LR.end << ':' << LR.valno->id << ")";
}
@@ -827,14 +823,7 @@ void LiveRange::dump() const {
errs() << *this << "\n";
}
-void LiveInterval::print(std::ostream &OS,
- const TargetRegisterInfo *TRI) const {
- raw_os_ostream RawOS(OS);
- print(RawOS, TRI);
-}
-
-void LiveInterval::print(raw_ostream &OS,
- const TargetRegisterInfo *TRI) const {
+void LiveInterval::print(raw_ostream &OS, const TargetRegisterInfo *TRI) const {
if (isStackSlot())
OS << "SS#" << getStackSlotIndex();
else if (TRI && TargetRegisterInfo::isPhysicalRegister(reg))
@@ -896,9 +885,6 @@ void LiveInterval::dump() const {
}
-void LiveRange::print(std::ostream &os) const {
- os << *this;
-}
void LiveRange::print(raw_ostream &os) const {
os << *this;
}
diff --git a/lib/CodeGen/LiveStackAnalysis.cpp b/lib/CodeGen/LiveStackAnalysis.cpp
index 86f7ea20c9..c89b70893f 100644
--- a/lib/CodeGen/LiveStackAnalysis.cpp
+++ b/lib/CodeGen/LiveStackAnalysis.cpp
@@ -19,6 +19,7 @@
#include "llvm/CodeGen/Passes.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
#include <limits>
using namespace llvm;
@@ -53,14 +54,16 @@ bool LiveStacks::runOnMachineFunction(MachineFunction &) {
/// print - Implement the dump method.
void LiveStacks::print(std::ostream &O, const Module*) const {
- O << "********** INTERVALS **********\n";
+ raw_os_ostream OS(O);
+
+ OS << "********** INTERVALS **********\n";
for (const_iterator I = begin(), E = end(); I != E; ++I) {
- I->second.print(O);
+ I->second.print(OS);
int Slot = I->first;
const TargetRegisterClass *RC = getIntervalRegClass(Slot);
if (RC)
- O << " [" << RC->getName() << "]\n";
+ OS << " [" << RC->getName() << "]\n";
else
- O << " [Unknown]\n";
+ OS << " [Unknown]\n";
}
}