Skip to content

Commit 73c7a68

Browse files
Remove dataflow::state_for_location
1 parent 48c2a1e commit 73c7a68

File tree

1 file changed

+0
-28
lines changed
  • src/librustc_mir/dataflow

1 file changed

+0
-28
lines changed

src/librustc_mir/dataflow/mod.rs

-28
Original file line numberDiff line numberDiff line change
@@ -459,34 +459,6 @@ where
459459
}
460460
}
461461

462-
pub fn state_for_location<'tcx, T: BitDenotation<'tcx>>(loc: Location,
463-
analysis: &T,
464-
result: &DataflowResults<'tcx, T>,
465-
body: &Body<'tcx>)
466-
-> BitSet<T::Idx> {
467-
let mut trans = GenKill::from_elem(HybridBitSet::new_empty(analysis.bits_per_block()));
468-
469-
for stmt in 0..loc.statement_index {
470-
let mut stmt_loc = loc;
471-
stmt_loc.statement_index = stmt;
472-
analysis.before_statement_effect(&mut trans, stmt_loc);
473-
analysis.statement_effect(&mut trans, stmt_loc);
474-
}
475-
476-
// Apply the pre-statement effect of the statement we're evaluating.
477-
if loc.statement_index == body[loc.block].statements.len() {
478-
analysis.before_terminator_effect(&mut trans, loc);
479-
} else {
480-
analysis.before_statement_effect(&mut trans, loc);
481-
}
482-
483-
// Apply the transfer function for all preceding statements to the fixpoint
484-
// at the start of the block.
485-
let mut state = result.sets().entry_set_for(loc.block.index()).to_owned();
486-
trans.apply(&mut state);
487-
state
488-
}
489-
490462
pub struct DataflowAnalysis<'a, 'tcx, O>
491463
where
492464
O: BitDenotation<'tcx>,

0 commit comments

Comments
 (0)