Re-exportsยง
use std::borrow::Cow;๐use rustc_data_structures::fx::FxHashSet;๐use rustc_index::IndexVec;๐use rustc_index::bit_set::DenseBitSet;๐use rustc_middle::ty::TyCtxt;๐use rustc_mir_dataflow::Analysis;๐use rustc_mir_dataflow::impls::MaybeStorageDead;๐use rustc_mir_dataflow::impls::always_storage_live_locals;๐use rustc_span::bug;๐use tracing::debug;๐use tracing::instrument;๐use tracing::instrument;๐use crate::PassPolicy;๐use crate::ssa::SsaLocals;๐use crate::ssa::StorageLiveLocals;๐use rustc_middle::mir::visit::*;๐use rustc_middle::mir::*;๐
Structsยง
- Reference
Propagation ๐ - Propagate references using SSA analysis.
- Replacer ๐
- Utility to help performing substitution of
*patternbytarget.
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
SsaLocalstreatsOperand::Moveas a read, even though in generalOperand::Moverepresents pass-by-pointer where the callee can overwrite the pointee (Miri always considers the place deinitialized). CopyProp has a similar trick to turnOperand::MoveintoOperand::Copywhen 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 ๐