[llvm] r257766 - [ARM] Use the efficient version of BitVector::set and a static_assert.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 06:33:05 PST 2016
Author: d0k
Date: Thu Jan 14 08:33:04 2016
New Revision: 257766
URL: http://llvm.org/viewvc/llvm-project?rev=257766&view=rev
Log:
[ARM] Use the efficient version of BitVector::set and a static_assert.
No functional change intended.
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=257766&r1=257765&r2=257766&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Thu Jan 14 08:33:04 2016
@@ -167,9 +167,8 @@ getReservedRegs(const MachineFunction &M
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)
More information about the llvm-commits
mailing list