Module rustc_mir_transform::add_retag
source · [−]Expand description
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.
Structs
Functions
Determines whether or not this LocalDecl is temp, if not it needs retagging.
Determines whether this place is “stable”: Whether, if we evaluate it again after the assignment, we can be sure to obtain the same place value. (Concurrent accesses by other threads are no problem as these are anyway non-atomic copies. Data races are UB.)
Determine whether this type may contain a reference (or box), and thus needs retagging.
We will only recurse depth times into Tuples/ADTs to bound the cost of this.