diff options
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index d43cc19683..144f0a7d43 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -685,8 +685,14 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur) } // All registers must have inf weight. Just grab one! - if (!minReg) + if (!minReg) { + if (active_.size() == 0) { + // FIXME: All the registers are occupied by fixed intervals. + cerr << "Register allocator ran out of registers!\n"; + abort(); + } minReg = *RC->allocation_order_begin(*mf_); + } } DOUT << "\t\tregister with min weight: " |