Ignore non-allocatable physical registers in live interval analysis.

llvm-svn: 10449
This commit is contained in:
Alkis Evlogimenos 2003-12-13 11:11:02 +00:00
parent ed53b35076
commit 7dbdf3839c
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;