summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-07-12 17:37:44 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-07-12 17:37:44 +0000
commitf5b9bb61f7a9642d0be87c47e47b94f23ade6060 (patch)
tree1ddd06ef3e4d9e4d25183b59b59da2e8d0ffe16b /llvm/lib/CodeGen/LiveInterval.cpp
parent9eb472ba4bb3672c2808fe6118818bc983d7dd1d (diff)
downloadbcm5719-llvm-f5b9bb61f7a9642d0be87c47e47b94f23ade6060.tar.gz
bcm5719-llvm-f5b9bb61f7a9642d0be87c47e47b94f23ade6060.zip
Add print/dump routines to LiveInterval::SubRange
llvm-svn: 275194
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 10e25f1fb81..93c5ca785ac 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -825,12 +825,12 @@ unsigned LiveInterval::getSize() const {
}
raw_ostream& llvm::operator<<(raw_ostream& os, const LiveRange::Segment &S) {
- return os << '[' << S.start << ',' << S.end << ':' << S.valno->id << ")";
+ return os << '[' << S.start << ',' << S.end << ':' << S.valno->id << ')';
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void LiveRange::Segment::dump() const {
- dbgs() << *this << "\n";
+ dbgs() << *this << '\n';
}
#endif
@@ -851,10 +851,10 @@ void LiveRange::print(raw_ostream &OS) const {
for (const_vni_iterator i = vni_begin(), e = vni_end(); i != e;
++i, ++vnum) {
const VNInfo *vni = *i;
- if (vnum) OS << " ";
- OS << vnum << "@";
+ if (vnum) OS << ' ';
+ OS << vnum << '@';
if (vni->isUnused()) {
- OS << "x";
+ OS << 'x';
} else {
OS << vni->def;
if (vni->isPHIDef())
@@ -864,22 +864,30 @@ void LiveRange::print(raw_ostream &OS) const {
}
}
+void LiveInterval::SubRange::print(raw_ostream &OS) const {
+ OS << " L" << PrintLaneMask(LaneMask) << ' '
+ << static_cast<const LiveRange&>(*this);
+}
+
void LiveInterval::print(raw_ostream &OS) const {
OS << PrintReg(reg) << ' ';
super::print(OS);
// Print subranges
- for (const SubRange &SR : subranges()) {
- OS << " L" << PrintLaneMask(SR.LaneMask) << ' ' << SR;
- }
+ for (const SubRange &SR : subranges())
+ OS << SR;
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void LiveRange::dump() const {
- dbgs() << *this << "\n";
+ dbgs() << *this << '\n';
+}
+
+LLVM_DUMP_METHOD void LiveInterval::SubRange::dump() const {
+ dbgs() << *this << '\n';
}
LLVM_DUMP_METHOD void LiveInterval::dump() const {
- dbgs() << *this << "\n";
+ dbgs() << *this << '\n';
}
#endif
OpenPOWER on IntegriCloud