We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around Reg for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.
I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
We've talked a bit
I think adding newtype wrappers around
Regfor general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.