forked from OSchip/llvm-project
Ignore non-allocatable physical registers in live interval analysis.
llvm-svn: 10449
This commit is contained in:
parent
ed53b35076
commit
7dbdf3839c
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue