[ARM] Use the efficient version of BitVector::set and a static_assert.

No functional change intended.

llvm-svn: 257766
This commit is contained in:
Benjamin Kramer 2016-01-14 14:33:04 +00:00
parent 428d9dbaf9
commit fc1f7d893e
1 changed files with 2 additions and 3 deletions

View File

@ -167,9 +167,8 @@ getReservedRegs(const MachineFunction &MF) const {
Reserved.set(ARM::R9);
// Reserve D16-D31 if the subtarget doesn't support them.
if (!STI.hasVFP3() || STI.hasD16()) {
assert(ARM::D31 == ARM::D16 + 15);
for (unsigned i = 0; i != 16; ++i)
Reserved.set(ARM::D16 + i);
static_assert(ARM::D31 == ARM::D16 + 15, "Register list not consecutive!");
Reserved.set(ARM::D16, ARM::D31 + 1);
}
const TargetRegisterClass *RC = &ARM::GPRPairRegClass;
for(TargetRegisterClass::iterator I = RC->begin(), E = RC->end(); I!=E; ++I)