Skip to content

Cranelift: provide Gpr and Xmm newtype wrappers around Reg and use them extensively in ISLE lowering #3685

@fitzgen

Description

@fitzgen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions