[llvm] [CodeGen] Re-land reverted PR (#216510): "Use RegisterClassInfo for remaining allocation-order users" with additional PBQP fix. (PR #222450)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 09:19:45 PDT 2026


================
@@ -818,6 +816,12 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
 
   MF.getRegInfo().freezeReservedRegs();
 
+  RegisterClassInfo &RCI =
+      getAnalysis<MachineRegisterClassInfoWrapperPass>().getRCI();
+  // freezeReservedRegs() may add reservations the shared analysis has not seen.
+  // Refresh RCI so getOrder() excludes them.
+  RCI.updateReservedRegs(MF.getRegInfo().getReservedRegs());
----------------
arsenm wrote:

I'd also just land the other pieces separately.

It's no big loss if PBQP isn't fixed, it's not like it's used 

https://github.com/llvm/llvm-project/pull/222450


More information about the llvm-commits mailing list