diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-09 03:05:53 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-09 03:05:53 +0000 |
| commit | 1331a15b0c58dc2923b894c4bf9b89e0b27adc23 (patch) | |
| tree | 3fda76a26c9fc48510934b0c2f4b6bb06fbc1d94 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
| parent | 7f93d8d62c9e1cb7b797fa42c8147cf67158760c (diff) | |
| download | bcm5719-llvm-1331a15b0c58dc2923b894c4bf9b89e0b27adc23.tar.gz bcm5719-llvm-1331a15b0c58dc2923b894c4bf9b89e0b27adc23.zip | |
Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance.
Print virtual registers numbered from 0 instead of the arbitrary
FirstVirtualRegister. The first virtual register is printed as %vreg0.
TRI::NoRegister is printed as %noreg.
llvm-svn: 123107
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 31d12ebdc47..97aee996db2 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -166,17 +166,6 @@ void MachineBasicBlock::dump() const { print(dbgs()); } -static inline void OutputReg(raw_ostream &os, unsigned RegNo, - const TargetRegisterInfo *TRI = 0) { - if (RegNo != 0 && TargetRegisterInfo::isPhysicalRegister(RegNo)) { - if (TRI) - os << " %" << TRI->get(RegNo).Name; - else - os << " %physreg" << RegNo; - } else - os << " %reg" << RegNo; -} - StringRef MachineBasicBlock::getName() const { if (const BasicBlock *LBB = getBasicBlock()) return LBB->getName(); @@ -214,7 +203,7 @@ void MachineBasicBlock::print(raw_ostream &OS, SlotIndexes *Indexes) const { if (Indexes) OS << '\t'; OS << " Live Ins:"; for (livein_iterator I = livein_begin(),E = livein_end(); I != E; ++I) - OutputReg(OS, *I, TRI); + OS << PrintReg(*I, TRI); OS << '\n'; } // Print the preds of this block according to the CFG. |

