Do not consider borrowed Freeze locals as SSA.
This commit is contained in:
parent
3490375570
commit
3c43b61b87
10 changed files with 69 additions and 43 deletions
|
@ -4,7 +4,7 @@ use rustc_index::IndexVec;
|
|||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::impls::{borrowed_locals, MaybeStorageDead};
|
||||
use rustc_mir_dataflow::impls::MaybeStorageDead;
|
||||
use rustc_mir_dataflow::storage::always_storage_live_locals;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
|
||||
|
@ -82,9 +82,7 @@ impl<'tcx> MirPass<'tcx> for ReferencePropagation {
|
|||
}
|
||||
|
||||
fn propagate_ssa<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
let param_env = tcx.param_env_reveal_all_normalized(body.source.def_id());
|
||||
let borrowed_locals = borrowed_locals(body);
|
||||
let ssa = SsaLocals::new(tcx, param_env, body, &borrowed_locals);
|
||||
let ssa = SsaLocals::new(body);
|
||||
|
||||
let mut replacer = compute_replacement(tcx, body, &ssa);
|
||||
debug!(?replacer.targets, ?replacer.allowed_replacements, ?replacer.storage_to_remove);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue