[llvm] [Mips] Introduce ABI-specific register names and accessors (PR #224284)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 06:33:11 PDT 2026
================
@@ -84,74 +103,76 @@ class HWR<bits<16> Enc, string n> : MipsReg<Enc, n>;
let Namespace = "Mips" in {
// General Purpose Registers
+ // TODO: Use R0-R31/R0_64-R31_64 record names without changing MIR names.
----------------
vdelvecc wrote:
If we're creating churn by renaming a bunch of stuff, we should actually improve things in a meaningful way. Renaming SP to R29 doesn't help usability or readability in any way I can see.
I agree with @FlyGoat that MIR register names matching the assembly are valuable. This is exactly what you're looking at when you're debugging anything post-RA in the backend. Clear tracing is incredibly useful, for both humans and AIs. And the patch looks simple enough.
But if that's no good for some reason, I'd prefer to keep the names that are uniform across the ABIs and just change the ones that diverge. It's a smaller change everywhere, and has less impact on usability. And still helps N64 where the names are broken now.
https://github.com/llvm/llvm-project/pull/224284
More information about the llvm-commits
mailing list