1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Use the PrintReg adaptor to correctly print live-in registers in debug output.

llvm-svn: 130715
This commit is contained in:
Jakob Stoklund Olesen 2011-05-02 20:06:30 +00:00
parent 3c707fcb60
commit 4ad266b02c

View File

@ -300,31 +300,19 @@ void MachineFunction::print(raw_ostream &OS, SlotIndexes *Indexes) const {
OS << "Function Live Ins: "; OS << "Function Live Ins: ";
for (MachineRegisterInfo::livein_iterator for (MachineRegisterInfo::livein_iterator
I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) { I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) {
if (TRI) OS << PrintReg(I->first, TRI);
OS << "%" << TRI->getName(I->first);
else
OS << " %physreg" << I->first;
if (I->second) if (I->second)
OS << " in reg%" << I->second; OS << " in " << PrintReg(I->second, TRI);
if (llvm::next(I) != E) if (llvm::next(I) != E)
OS << ", "; OS << ", ";
} }
OS << '\n'; OS << '\n';
} }
if (RegInfo && !RegInfo->liveout_empty()) { if (RegInfo && !RegInfo->liveout_empty()) {
OS << "Function Live Outs: "; OS << "Function Live Outs:";
for (MachineRegisterInfo::liveout_iterator for (MachineRegisterInfo::liveout_iterator
I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I){ I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I)
if (TRI) OS << ' ' << PrintReg(*I, TRI);
OS << '%' << TRI->getName(*I);
else
OS << "%physreg" << *I;
if (llvm::next(I) != E)
OS << " ";
}
OS << '\n'; OS << '\n';
} }