summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-24 10:36:58 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-24 10:36:58 +0000
commit796e43eede5d1af588c327051f28cc6e7bf78353 (patch)
tree5a2979107c9b50c719ea684ad1a79dbc8fea187e /llvm/lib/CodeGen/LiveInterval.cpp
parentb99eac88144da4c79a03ef90cac78336bc90228f (diff)
downloadbcm5719-llvm-796e43eede5d1af588c327051f28cc6e7bf78353.tar.gz
bcm5719-llvm-796e43eede5d1af588c327051f28cc6e7bf78353.zip
Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream. llvm-svn: 76965
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index c8d3d43e520..78bde3998c5 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -24,6 +24,7 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include <algorithm>
#include <ostream>
@@ -819,6 +820,9 @@ 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 << ")";
+}
void LiveRange::dump() const {
cerr << *this << "\n";
@@ -826,6 +830,12 @@ void LiveRange::dump() const {
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 {
if (isStackSlot())
OS << "SS#" << getStackSlotIndex();
else if (TRI && TargetRegisterInfo::isPhysicalRegister(reg))
@@ -890,3 +900,6 @@ void LiveInterval::dump() const {
void LiveRange::print(std::ostream &os) const {
os << *this;
}
+void LiveRange::print(raw_ostream &os) const {
+ os << *this;
+}
OpenPOWER on IntegriCloud