summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-02 20:06:30 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-02 20:06:30 +0000
commit6297a715dcf7b7190f67641f38926b7394fdb318 (patch)
treef730fccc05ce323fad0f6383a3f0e9f51fbdd37a /llvm/lib/CodeGen/MachineFunction.cpp
parent7dffc8ecf25b3384b833f67a415ebafe123700c5 (diff)
downloadbcm5719-llvm-6297a715dcf7b7190f67641f38926b7394fdb318.tar.gz
bcm5719-llvm-6297a715dcf7b7190f67641f38926b7394fdb318.zip
Use the PrintReg adaptor to correctly print live-in registers in debug output.
llvm-svn: 130715
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index d81e4a1d015..2dde6adbaac 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -300,31 +300,19 @@ void MachineFunction::print(raw_ostream &OS, SlotIndexes *Indexes) const {
OS << "Function Live Ins: ";
for (MachineRegisterInfo::livein_iterator
I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) {
- if (TRI)
- OS << "%" << TRI->getName(I->first);
- else
- OS << " %physreg" << I->first;
-
+ OS << PrintReg(I->first, TRI);
if (I->second)
- OS << " in reg%" << I->second;
-
+ OS << " in " << PrintReg(I->second, TRI);
if (llvm::next(I) != E)
OS << ", ";
}
OS << '\n';
}
if (RegInfo && !RegInfo->liveout_empty()) {
- OS << "Function Live Outs: ";
+ OS << "Function Live Outs:";
for (MachineRegisterInfo::liveout_iterator
- I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I){
- if (TRI)
- OS << '%' << TRI->getName(*I);
- else
- OS << "%physreg" << *I;
-
- if (llvm::next(I) != E)
- OS << " ";
- }
+ I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I)
+ OS << ' ' << PrintReg(*I, TRI);
OS << '\n';
}
OpenPOWER on IntegriCloud