forked from OSchip/llvm-project
Mask out reserved registers when constructing the set of allocatable regs.
llvm-svn: 112828
This commit is contained in:
parent
5a1df805e5
commit
5d43a35e6d
|
@ -80,6 +80,11 @@ BitVector TargetRegisterInfo::getAllocatableSet(const MachineFunction &MF,
|
|||
for (TargetRegisterInfo::regclass_iterator I = regclass_begin(),
|
||||
E = regclass_end(); I != E; ++I)
|
||||
getAllocatableSetForRC(MF, *I, Allocatable);
|
||||
|
||||
// Mask out the reserved registers
|
||||
BitVector Reserved = getReservedRegs(MF);
|
||||
Allocatable ^= Reserved & Allocatable;
|
||||
|
||||
return Allocatable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue