Skip to content

Commit 3cc72fa

Browse files
committed
MIR dataflow: Rename function to always_storage_live_locals
Related to #99021.
1 parent 20dd693 commit 3cc72fa

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_middle::ty::layout::{
1515
use rustc_middle::ty::{
1616
self, query::TyCtxtAt, subst::SubstsRef, ParamEnv, Ty, TyCtxt, TypeFoldable,
1717
};
18-
use rustc_mir_dataflow::storage::always_live_locals;
18+
use rustc_mir_dataflow::storage::always_storage_live_locals;
1919
use rustc_query_system::ich::StableHashingContext;
2020
use rustc_session::Limit;
2121
use rustc_span::{Pos, Span};
@@ -707,7 +707,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
707707
let mut locals = IndexVec::from_elem(dummy, &body.local_decls);
708708

709709
// Now mark those locals as live that have no `Storage*` annotations.
710-
let always_live = always_live_locals(self.body());
710+
let always_live = always_storage_live_locals(self.body());
711711
for local in locals.indices() {
712712
if always_live.contains(local) {
713713
locals[local].value = LocalValue::Live(Operand::Immediate(Immediate::Uninit));

compiler/rustc_const_eval/src/transform/validate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc_middle::mir::{
1414
use rustc_middle::ty::fold::BottomUpFolder;
1515
use rustc_middle::ty::{self, InstanceDef, ParamEnv, Ty, TyCtxt, TypeFoldable, TypeVisitable};
1616
use rustc_mir_dataflow::impls::MaybeStorageLive;
17-
use rustc_mir_dataflow::storage::always_live_locals;
17+
use rustc_mir_dataflow::storage::always_storage_live_locals;
1818
use rustc_mir_dataflow::{Analysis, ResultsCursor};
1919
use rustc_target::abi::{Size, VariantIdx};
2020

@@ -48,7 +48,7 @@ impl<'tcx> MirPass<'tcx> for Validator {
4848
let param_env = tcx.param_env(def_id);
4949
let mir_phase = self.mir_phase;
5050

51-
let always_live_locals = always_live_locals(body);
51+
let always_live_locals = always_storage_live_locals(body);
5252
let storage_liveness = MaybeStorageLive::new(always_live_locals)
5353
.into_engine(tcx, body)
5454
.iterate_to_fixpoint()

compiler/rustc_mir_dataflow/src/storage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_middle::mir::{self, Local};
77
//
88
// FIXME: Currently, we need to traverse the entire MIR to compute this. We should instead store it
99
// as a field in the `LocalDecl` for each `Local`.
10-
pub fn always_live_locals(body: &mir::Body<'_>) -> BitSet<Local> {
10+
pub fn always_storage_live_locals(body: &mir::Body<'_>) -> BitSet<Local> {
1111
let mut always_live_locals = BitSet::new_filled(body.local_decls.len());
1212

1313
for block in body.basic_blocks() {

compiler/rustc_mir_transform/src/generator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ impl<'tcx> MirPass<'tcx> for StateTransform {
13791379
},
13801380
);
13811381

1382-
let always_live_locals = storage::always_live_locals(&body);
1382+
let always_live_locals = storage::always_storage_live_locals(&body);
13831383

13841384
let liveness_info =
13851385
locals_live_across_suspend_points(tcx, body, &always_live_locals, movable);

0 commit comments

Comments
 (0)