Skip to content

Commit e34fd2e

Browse files
committed
[CodeGen] Simplify RegisterClassInfo BitVector comparisons. NFC.
1 parent bd8bec2 commit e34fd2e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/RegisterClassInfo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
9696
for (const MCPhysReg *I = CSR; *I; ++I)
9797
for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI)
9898
CSRHintsForAllocOrder[*AI] = STI.ignoreCSRForAllocationOrder(mf, *AI);
99-
if (IgnoreCSRForAllocOrder.size() != CSRHintsForAllocOrder.size() ||
100-
IgnoreCSRForAllocOrder != CSRHintsForAllocOrder) {
99+
if (IgnoreCSRForAllocOrder != CSRHintsForAllocOrder) {
101100
Update = true;
102101
IgnoreCSRForAllocOrder = CSRHintsForAllocOrder;
103102
}
@@ -106,7 +105,7 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
106105

107106
// Different reserved registers?
108107
const BitVector &RR = MF->getRegInfo().getReservedRegs();
109-
if (Reserved.size() != RR.size() || RR != Reserved) {
108+
if (RR != Reserved) {
110109
Update = true;
111110
Reserved = RR;
112111
}

0 commit comments

Comments
 (0)