[llvm] [CodeGen] Use shared RegClassInfo in basic, greedy and fast allocators (PR #226523)
Nikhil Kotikalapudi via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 22:32:20 PDT 2026
================
@@ -57,15 +57,17 @@ bool RegAllocBase::VerifyEnabled = false;
// Pin the vtable to this file.
void RegAllocBase::anchor() {}
-void RegAllocBase::init(VirtRegMap &vrm, LiveIntervals &lis,
- LiveRegMatrix &mat) {
+void RegAllocBase::init(VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat,
+ RegisterClassInfo &rci) {
TRI = &vrm.getTargetRegInfo();
MRI = &vrm.getRegInfo();
VRM = &vrm;
LIS = &lis;
Matrix = &mat;
+ RegClassInfo = &rci;
MRI->freezeReservedRegs();
- RegClassInfo.runOnMachineFunction(vrm.getMachineFunction());
+ // Keep the shared analysis in step with the set just frozen.
+ RegClassInfo->updateReservedRegs(MRI->getReservedRegs());
----------------
nkotikal wrote:
Thanks, I was referring to the `freezeReservedRegs` in the RAs though? But currently not sure what needs to be done there
https://github.com/llvm/llvm-project/pull/226523
More information about the llvm-commits
mailing list