mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Exit with nice warnings when register allocator run out of registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2228,7 +2228,19 @@ void LiveIntervals::spillPhysRegAroundRegDefsUses(const LiveInterval &li,
|
||||
unsigned Index = getInstructionIndex(MI);
|
||||
if (pli.liveAt(Index)) {
|
||||
vrm.addEmergencySpill(SpillReg, MI);
|
||||
pli.removeRange(getLoadIndex(Index), getStoreIndex(Index)+1);
|
||||
unsigned StartIdx = getLoadIndex(Index);
|
||||
unsigned EndIdx = getStoreIndex(Index)+1;
|
||||
if (pli.isInOneLiveRange(StartIdx, EndIdx))
|
||||
pli.removeRange(StartIdx, EndIdx);
|
||||
else {
|
||||
cerr << "Ran out of registers during register allocation!\n";
|
||||
if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {
|
||||
cerr << "Please check your inline asm statement for invalid "
|
||||
<< "constraints:\n";
|
||||
MI->print(cerr.stream(), tm_);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
for (const unsigned* AS = tri_->getSubRegisters(SpillReg); *AS; ++AS) {
|
||||
if (!hasInterval(*AS))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user