Fix a sub-register indice propagation bug.
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index 1e0171a39f650b9171feda3c5c4285e1bc7e9391..a9501259d24bbf2b8274c1f333b5ae5bd41a2bef 100644 (file)
@@ -214,7 +214,7 @@ void MachineFunction::print(std::ostream &OS) const {
     for (MachineRegisterInfo::livein_iterator
          I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) {
       if (TRI)
-        OS << " " << TRI->getPrintableName(I->first);
+        OS << " " << TRI->getName(I->first);
       else
         OS << " Reg #" << I->first;
       
@@ -228,7 +228,7 @@ void MachineFunction::print(std::ostream &OS) const {
     for (MachineRegisterInfo::liveout_iterator
          I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I)
       if (TRI)
-        OS << " " << TRI->getPrintableName(*I);
+        OS << " " << TRI->getName(*I);
       else
         OS << " Reg #" << *I;
     OS << "\n";
@@ -317,7 +317,8 @@ MachineFunction::construct(const Function *Fn, const TargetMachine &Tar)
 
 void MachineFunction::destruct(const Function *Fn) {
   bool Deleted = Fn->deleteAnnotation(MF_AID);
-  assert(Deleted && "Machine code did not exist for function!");
+  assert(Deleted && "Machine code did not exist for function!"); 
+  Deleted = Deleted; // silence warning when no assertions.
 }
 
 MachineFunction& MachineFunction::get(const Function *F)
@@ -350,6 +351,10 @@ void MachineFrameInfo::print(const MachineFunction &MF, std::ostream &OS) const{
   for (unsigned i = 0, e = Objects.size(); i != e; ++i) {
     const StackObject &SO = Objects[i];
     OS << "  <fi #" << (int)(i-NumFixedObjects) << ">: ";
+    if (SO.Size == ~0ULL) {
+      OS << "dead\n";
+      continue;
+    }
     if (SO.Size == 0)
       OS << "variable sized";
     else