This pass adds validation calls (AcquireValid, ReleaseValid) where appropriate.
It has to be run really early, before transformations like inlining, because
introducing these calls adds UB β so, conceptually, this pass is actually part
of MIR building, and only after this pass we think of the program has having the
normal MIR semantics.
This module provides a pass that removes parts of MIR that are no longer relevant after
analysis phase and borrowck. In particular, it removes false edges, user type annotations and
replaces following statements with Nops:
A pass that inserts the ConstEvalCounter instruction into any blocks that have a back edge
(thus indicating there is a loop in the CFG), or whose terminator is a function call.
A lint that checks for known panics like overflows, division by zero,
out-of-bound access etc. Uses const propagation to determine the values of
operands during checks.
This pass statically detects code which has undefined behaviour or is likely to be erroneous.
It can be used to locate problems in MIR building or optimizations. It assumes that all code
can be executed, so it has false positives.
Normalizes MIR in TypingMode::PostAnalysis mode, most notably revealing
its opaques. We also only normalize specializable associated items once in
PostAnalysis mode.
We denote as βSSAβ the set of locals that verify the following properties:
1/ They are only assigned-to once, either as a function parameter, or in an assign statement;
2/ This single assignment dominates all uses;
A pass that propagates the unreachable terminator of a block to its predecessors
when all of their successors are unreachable. This is achieved through a
post-order traversal of the blocks.
We import passes via this macro so that we can have a static list of pass names
(used to verify CLI arguments). It takes a list of modules, followed by the passes
declared within them.
Raw content of Fluent resource for this crate, generated by fluent_messages macro,
imported by rustc_driver to include all cratesβ resources in one bundle.
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.