Modules

Structs

Statics

Functions

  • mir_const 🔒
    Make MIR ready for const evaluation. This is run on all MIR, not just on consts! FIXME(oli-obk): it’s unclear whether we still need this phase (and its corresponding query). We used to have this for pre-miri MIR based const eval.
  • Obtain just the main MIR (no promoteds) and run some cleanups on it. This also runs mir borrowck before doing so in order to ensure that borrowck can be run and doesn’t end up missing the source MIR due to stealing happening.
  • Compute the MIR that is used during CTFE (and thus has no optimizations run on it)
  • Same as mir_for_ctfe, but used to get the MIR of a const generic parameter. The docs on WithOptConstParam explain this a bit more, but the TLDR is that we’d get cycle errors with mir_for_ctfe, because typeck would need to typeck the const parameter while type checking the main body, which in turn would try to type check the main body again.
  • mir_keys 🔒
    Finds the full set of DefIds within the current crate that have MIR associated with them.
  • Compute the main MIR body and the list of MIR bodies of the promoteds.
  • o1 🔒
  • Optimize the MIR and prepare it for codegen.
  • Fetch all the promoteds of an item and prepare their MIR bodies to be ready for constant evaluation once all substitutions become known.
  • After this series of passes, no lifetime analysis based on borrowing can be done.
  • Returns the sequence of passes that do the initial cleanup of runtime MIR.
  • Returns the sequence of passes that lowers analysis to runtime MIR.