From 4a84cce3ed0008baf72ccc6831a046215addd2d7 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 14 Dec 2010 18:53:47 +0000 Subject: Use TRI::printReg instead of AbstractRegisterDescription when printing LiveIntervalUnions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121781 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveIntervalUnion.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'lib/CodeGen/LiveIntervalUnion.cpp') diff --git a/lib/CodeGen/LiveIntervalUnion.cpp b/lib/CodeGen/LiveIntervalUnion.cpp index 59d48a4b64..e8b39914ca 100644 --- a/lib/CodeGen/LiveIntervalUnion.cpp +++ b/lib/CodeGen/LiveIntervalUnion.cpp @@ -18,7 +18,10 @@ #include "llvm/ADT/SparseBitVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetRegisterInfo.h" + #include + using namespace llvm; @@ -66,24 +69,16 @@ void LiveIntervalUnion::extract(LiveInterval &VirtReg) { } void -LiveIntervalUnion::print(raw_ostream &OS, - const AbstractRegisterDescription *RegDesc) const { +LiveIntervalUnion::print(raw_ostream &OS, const TargetRegisterInfo *TRI) const { OS << "LIU "; - if (RegDesc != NULL) - OS << RegDesc->getName(RepReg); - else { - OS << RepReg; + TRI->printReg(RepReg, OS); + for (LiveSegments::const_iterator SI = Segments.begin(); SI.valid(); ++SI) { + OS << " [" << SI.start() << ' ' << SI.stop() << "):"; + TRI->printReg(SI.value()->reg, OS); } - for (LiveSegments::const_iterator SI = Segments.begin(); SI.valid(); ++SI) - dbgs() << " [" << SI.start() << ' ' << SI.stop() << "):%reg" - << SI.value()->reg; OS << "\n"; } -void LiveIntervalUnion::dump(const AbstractRegisterDescription *RegDesc) const { - print(dbgs(), RegDesc); -} - #ifndef NDEBUG // Verify the live intervals in this union and add them to the visited set. void LiveIntervalUnion::verify(LiveVirtRegBitSet& VisitedVRegs) { -- cgit v1.2.3