Skip to content

Passes over IR #65

@MikeInnes

Description

@MikeInnes

Cassette has gotten quite a bit more ambitious since it started out, but there is some way to go to really get past "contextual dispatch and metadata propagation" and become a general tool for creating new compilers on top of Julia.

One immediate step is that Cassette passes should be able to work on Julia's SSA IR. Aside from the fact that the IR has much more tooling around it (beyond find-and-replace), it's a natural format for many of the analyses and semantic transformations we might want to plug into the compiler.

I think that IR should eventually be the default with lowered code hidden from view, but this isn't possible right now as phi nodes are only accepted by the compiler post-type-inference. One workaround is to work on code_typed, preserving type information as much as possible, and then allow generated functions to return typed code without trying to re-infer it. It's hacky but it does get the job done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions