rvalue checking – because identifying rvalues is trivial in MIR
Absolutely
dead-code – because MIR is simpler to traverse and it is more evident when something is being used
reachability – as above
Nice, but these is pretty stable (so low value).
match checking – because I think we do something basically equivalent during MIR construction; see below
The algorithms are somewhat different, and patterns will be cleaned-up in the HIR work - may be better to separate them.
effect – this is trickier, because the scope of unsafe regions is not preserved in MIR right now; however, identifying derefs and casts is
very easy, so I feel like the code would be more robust if impl’d on
MIR. Therefore, I think we should add information to track unsafe
regions to MIR.
this is a rather trivial pass, and it rather depends on lexical nesting, so I am not sure.
intrinsicck – because it is easier to identify calls to transmute
The utility of this pass is dubious because of associated types - we should probably make it a lint (but we need ABI-accessing lints for that).
trans
of course