Closed
Description
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: TheMirMap
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 theMirPass
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 betweenMirMapConstruction
,MirTypeck
, andMirPass
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.