[llvm] [AMDGPU][CodeGen] Incrementally update reserved regs for SIPreAllocateWWMRegs pass in RegisterClassInfo (PR #212201)

Nikhil Kotikalapudi via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 07:11:36 PDT 2026


================
@@ -180,8 +172,10 @@ void SIPreAllocateWWMRegs::rewriteRegs(MachineFunction &MF) {
 
   RegsToRewrite.clear();
 
-  // Update the set of reserved registers to include WWM ones.
+  // Update the set of reserved registers to include WWM ones
+  // without unnecessarily invalidating RegClassInfo.
   MRI->freezeReservedRegs();
+  RegClassInfo.updateReservedRegs(MRI->getReservedRegs());
----------------
nkotikal wrote:

Will do, thanks

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


More information about the llvm-commits mailing list