Handle registers a bit more efficiently

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-08-01 08:12:41 +00:00
parent 068758e518
commit 25369cfa2b

View File

@ -106,7 +106,13 @@ namespace {
// This method is used by the tablegen'erated instruction printer.
void printOperand(const MachineOperand &MO, MVT::ValueType VT) {
printOp(MO);
if (MO.getType() == MachineOperand::MO_MachineRegister) {
assert(MRegisterInfo::isPhysicalRegister(MO.getReg())&&"Not physref??");
// Bug Workaround: See note in Printer::doInitialization about %.
O << "%" << TM.getRegisterInfo()->get(MO.getReg()).Name;
} else {
printOp(MO);
}
}
void printImplUsesBefore(const TargetInstrDescriptor &Desc);