[llvm] [CodeGen] Use non-static Register::virtRegIndex() instead of static Register::virtReg2Index. NFC (PR #125031)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 22:02:54 PST 2025


================
@@ -311,8 +311,8 @@ bool WebAssemblyRegColoring::runOnMachineFunction(MachineFunction &MF) {
     // If we reassigned the stack pointer, update the debug frame base info.
     if (Old != New && MFI.isFrameBaseVirtual() && MFI.getFrameBaseVreg() == Old)
       MFI.setFrameBaseVreg(New);
-    LLVM_DEBUG(dbgs() << "Assigning vreg" << Register::virtReg2Index(LI->reg())
-                      << " to vreg" << Register::virtReg2Index(New) << "\n");
+    LLVM_DEBUG(dbgs() << "Assigning vreg" << LI->reg().virtRegIndex()
+                      << " to vreg" << New.virtRegIndex() << "\n");
----------------
arsenm wrote:

```suggestion
                      << " to vreg " << printReg(New) << '\n');
```

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


More information about the llvm-commits mailing list