Ignore non-allocatable physical registers in live interval analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10449 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2003-12-13 11:11:02 +00:00
parent 7d65a12fe6
commit 4c214d2bf0
2 changed files with 8 additions and 0 deletions

View File

@ -202,6 +202,10 @@ public:
/// register.
VarInfo &getVarInfo(unsigned RegIdx);
const std::vector<bool>& getAllocatablePhysicalRegisters() const {
return AllocatablePhysicalRegisters;
}
void MarkVirtRegAliveInBlock(VarInfo &VRInfo, const BasicBlock *BB);
void HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
MachineInstr *MI);

View File

@ -183,6 +183,10 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb,
unsigned reg)
{
DEBUG(std::cerr << "\t\t\tregister: ";printRegName(reg); std::cerr << '\n');
if (!lv_->getAllocatablePhysicalRegisters()[reg]) {
DEBUG(std::cerr << "\t\t\t\tnon allocatable register: ignoring\n");
return;
}
unsigned start = getInstructionIndex(*mi);
unsigned end = start;