RAGreedy has two fields of RegisterClassInfo, one called RCI and another RegClassInfo from its base class.
RCI is initialized without freezeReservedRegs first, while RegClassInfo does. Therefore, if reserved registers
information is changed between last time freezeReservedRegs is called and RAGreedy, it's not picked up by RCI.
Instead of having both fields in RAGreedy, remove RCI and use RegClassInfo instead. Also removed is the TRI field
which is present in its base class.
Details
Details
- Reviewers
qcolombet MatzeB - Commits
- rG12bae5f3e2d2: Remove duplicate fields in RAGreedy
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Therefore, if reserved registers information is changed between last time freezeReservedRegs is called and RAGreedy, it's not picked up by RCI.
That is surprising, shouldn't you trigger an assert in MachineRegisterInfo::getReservedRegs if reserved regs are queried before freezeReservedRegs is called?
(of course this change is good regardless)
Comment Actions
I don't think we have unfreeze so once you freeze it once anywhere in a pass before RAGreedy, the assert won't trigger.