mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
Use the PrintReg adaptor to correctly print live-in registers in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130715 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2048e4ab7f
commit
e2f669fb3f
@ -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';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user