Skip to content

Commit 942cc9a

Browse files
committed
Revert "[CodeGen] Don't include aliases in RegisterClassInfo::IgnoreCSRForAllocOrder (#80015)"
This reverts commit f852503. It was supposed to speed things up but llvm-compile-time-tracker.com showed a slight slow down.
1 parent da784a2 commit 942cc9a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/CodeGen/RegisterClassInfo.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
9393
// Even if CSR list is same, we could have had a different allocation order
9494
// if ignoreCSRForAllocationOrder is evaluated differently.
9595
BitVector CSRHintsForAllocOrder(TRI->getNumRegs());
96-
for (MCPhysReg I = 1, E = TRI->getNumRegs(); I != E; ++I)
97-
CSRHintsForAllocOrder[I] = STI.ignoreCSRForAllocationOrder(mf, I);
98-
if (IgnoreCSRForAllocOrder != CSRHintsForAllocOrder) {
96+
for (const MCPhysReg *I = CSR; *I; ++I)
97+
for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI)
98+
CSRHintsForAllocOrder[*AI] = STI.ignoreCSRForAllocationOrder(mf, *AI);
99+
if (IgnoreCSRForAllocOrder.size() != CSRHintsForAllocOrder.size() ||
100+
IgnoreCSRForAllocOrder != CSRHintsForAllocOrder) {
99101
Update = true;
100102
IgnoreCSRForAllocOrder = CSRHintsForAllocOrder;
101103
}

0 commit comments

Comments
 (0)