Remove AlwaysLiveLocals
wrapper struct
It is just a wrapper around a `BitSet` and doesn't have any functionality of its own.
This commit is contained in:
parent
7fe2c4b00d
commit
631d767fee
5 changed files with 19 additions and 38 deletions
|
@ -15,7 +15,7 @@ use rustc_middle::ty::layout::{
|
|||
use rustc_middle::ty::{
|
||||
self, query::TyCtxtAt, subst::SubstsRef, ParamEnv, Ty, TyCtxt, TypeFoldable,
|
||||
};
|
||||
use rustc_mir_dataflow::storage::AlwaysLiveLocals;
|
||||
use rustc_mir_dataflow::storage::always_live_locals;
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
use rustc_session::Limit;
|
||||
use rustc_span::{Pos, Span};
|
||||
|
@ -715,7 +715,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
|
||||
// Now mark those locals as dead that we do not want to initialize
|
||||
// Mark locals that use `Storage*` annotations as dead on function entry.
|
||||
let always_live = AlwaysLiveLocals::new(self.body());
|
||||
let always_live = always_live_locals(self.body());
|
||||
for local in locals.indices() {
|
||||
if !always_live.contains(local) {
|
||||
locals[local].value = LocalValue::Dead;
|
||||
|
|
|
@ -14,7 +14,7 @@ use rustc_middle::mir::{
|
|||
use rustc_middle::ty::fold::BottomUpFolder;
|
||||
use rustc_middle::ty::{self, InstanceDef, ParamEnv, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_mir_dataflow::impls::MaybeStorageLive;
|
||||
use rustc_mir_dataflow::storage::AlwaysLiveLocals;
|
||||
use rustc_mir_dataflow::storage::always_live_locals;
|
||||
use rustc_mir_dataflow::{Analysis, ResultsCursor};
|
||||
use rustc_target::abi::{Size, VariantIdx};
|
||||
|
||||
|
@ -48,7 +48,7 @@ impl<'tcx> MirPass<'tcx> for Validator {
|
|||
let param_env = tcx.param_env(def_id);
|
||||
let mir_phase = self.mir_phase;
|
||||
|
||||
let always_live_locals = AlwaysLiveLocals::new(body);
|
||||
let always_live_locals = always_live_locals(body);
|
||||
let storage_liveness = MaybeStorageLive::new(always_live_locals)
|
||||
.into_engine(tcx, body)
|
||||
.iterate_to_fixpoint()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue