Module ref_prop

Module ref_prop 

Source

Structsยง

ReferencePropagation ๐Ÿ”’
Propagate references using SSA analysis.
Replacer ๐Ÿ”’
Utility to help performing substitution of *pattern by target.

Enumsยง

Value ๐Ÿ”’

Functionsยง

compute_replacement ๐Ÿ”’
For each local, save the place corresponding to *local.
fully_replaceable_locals ๐Ÿ”’
Compute the set of locals that can be fully replaced.
move_to_copy_pointers ๐Ÿ”’
The SSA analysis done by SsaLocals treats Operand::Move as a read, even though in general Operand::Move represents pass-by-pointer where the callee can overwrite the pointee (Miri always considers the place deinitialized). CopyProp has a similar trick to turn Operand::Move into Operand::Copy when required for an optimization, but in this pass we just turn all moves of pointers into copies because pointers should be by-value anyway.
propagate_ssa ๐Ÿ”’