Add debugging output.
[oota-llvm.git] / lib / CodeGen / PostRASchedulerList.cpp
index 66bcf8cec82e6e0f53973c0a70d9797847850668..e52158cfeb4e778f37207114074f2642505fd639 100644 (file)
@@ -643,8 +643,18 @@ bool SchedulePostRATDList::BreakAntiDependencies() {
       Max = SU;
   }
 
-  DEBUG(errs() << "Critical path has total latency "
-        << (Max->getDepth() + Max->Latency) << "\n");
+#ifndef NDEBUG
+  {
+    DEBUG(errs() << "Critical path has total latency "
+          << (Max->getDepth() + Max->Latency) << "\n");
+    DEBUG(errs() << "Available regs:");
+    for (unsigned Reg = 0; Reg < TRI->getNumRegs(); ++Reg) {
+      if (KillIndices[Reg] == ~0u)
+        DEBUG(errs() << " " << TRI->getName(Reg));
+    }
+    DEBUG(errs() << '\n');
+  }
+#endif
 
   // Track progress along the critical path through the SUnit graph as we walk
   // the instructions.