Move register class name strings to a single array in MCRegisterInfo to reduce static...
[oota-llvm.git] / lib / CodeGen / LiveRangeEdit.cpp
index c27d6309fe9fed47d5a039976ca8e791297e8eba..8623dff333039c40e32ea4efd3ba9644d1b5debc 100644 (file)
@@ -411,8 +411,11 @@ LiveRangeEdit::calculateRegClassAndHint(MachineFunction &MF,
   for (unsigned I = 0, Size = size(); I < Size; ++I) {
     LiveInterval &LI = LIS.getInterval(get(I));
     if (MRI.recomputeRegClass(LI.reg, MF.getTarget()))
-      DEBUG(dbgs() << "Inflated " << PrintReg(LI.reg) << " to "
-                   << MRI.getRegClass(LI.reg)->getName() << '\n');
+      DEBUG({
+        const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
+        dbgs() << "Inflated " << PrintReg(LI.reg) << " to "
+               << TRI->getRegClassName(MRI.getRegClass(LI.reg)) << '\n'
+      });
     VRAI.calculateSpillWeightAndHint(LI);
   }
 }