Skip to content

incr. comp.: Clarify story around MIR dependency tracking #34765

Closed
@michaelwoerister

Description

@michaelwoerister

At the moment, dependency tracking around MIR related things is not implemented completely. In particular:

  • We generate various MIR-related dependency nodes (MirMapConstruction, MirPass, MirTypeck) but we don't seem to register any reads to these nodes later on: The MirMap allows for accessing MIR with the dependency tracking system knowing about it.
  • There doesn't seem to be a reason why MirTypeck is its own kind of dependency node while all other passes use the MirPass node.
  • There is no clear dependency node for registering read edges to after MIR has been fully constructed. MirMapConstruction more or less tracks dependencies of constructing MIR before any transformations are done on it. Reusing it for registering reads to the final MIR would be possible, but would lead to a strange tangle of circular dependencies between MirMapConstruction, MirTypeck, and MirPass nodes. It would not be wrong but it would be messy.

I suggest that we either just have one kind of MIR dependency node that subsumes MIR construction and all transformations on it, or that we have a more accurate representation of dependencies where each kind of MIR pass has its own kind of dependency node and then there is a FinalMir node, that represents the MIR in its final state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions