Mask out reserved registers when constructing the set of allocatable regs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112828 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-09-02 16:31:21 +00:00
parent 82a9c8480e
commit 5a0fabae5a

View File

@ -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;
}