<rdar://problem/7453528>. Track only physical registers that are valid for the target.
[oota-llvm.git] / lib / CodeGen / PostRASchedulerList.cpp
index 6995e9db1c1351c8d4588e08839af4e4dbd5ca28..79be29526c4a8f4d67236d4a9291e37ef330d7ed 100644 (file)
@@ -373,7 +373,8 @@ void SchedulePostRATDList::FinishBlock() {
 ///
 void SchedulePostRATDList::StartBlockForKills(MachineBasicBlock *BB) {
   // Initialize the indices to indicate that no registers are live.
-  std::fill(KillIndices, array_endof(KillIndices), ~0u);
+  for (unsigned i = 0; i < TRI->getNumRegs(); ++i)
+    KillIndices[i] = ~0u;
 
   // Determine the live-out physregs for this block.
   if (!BB->empty() && BB->back().getDesc().isReturn()) {