diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-16 17:53:02 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-16 17:53:02 -0700 |
| commit | 73c7a6813d1eae1e5c37c00fecd897cb7d45908c (patch) | |
| tree | 7aa3dcef88243cab75a5544c885d20d49265ef48 /src | |
| parent | 48c2a1ee3a77467f072ee00d451d43b60b13d946 (diff) | |
| download | rust-73c7a6813d1eae1e5c37c00fecd897cb7d45908c.tar.gz rust-73c7a6813d1eae1e5c37c00fecd897cb7d45908c.zip | |
Remove `dataflow::state_for_location`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/dataflow/mod.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/librustc_mir/dataflow/mod.rs b/src/librustc_mir/dataflow/mod.rs index c9da51233d4..a4dc3989c5b 100644 --- a/src/librustc_mir/dataflow/mod.rs +++ b/src/librustc_mir/dataflow/mod.rs @@ -459,34 +459,6 @@ where } } -pub fn state_for_location<'tcx, T: BitDenotation<'tcx>>(loc: Location, - analysis: &T, - result: &DataflowResults<'tcx, T>, - body: &Body<'tcx>) - -> BitSet<T::Idx> { - let mut trans = GenKill::from_elem(HybridBitSet::new_empty(analysis.bits_per_block())); - - for stmt in 0..loc.statement_index { - let mut stmt_loc = loc; - stmt_loc.statement_index = stmt; - analysis.before_statement_effect(&mut trans, stmt_loc); - analysis.statement_effect(&mut trans, stmt_loc); - } - - // Apply the pre-statement effect of the statement we're evaluating. - if loc.statement_index == body[loc.block].statements.len() { - analysis.before_terminator_effect(&mut trans, loc); - } else { - analysis.before_statement_effect(&mut trans, loc); - } - - // Apply the transfer function for all preceding statements to the fixpoint - // at the start of the block. - let mut state = result.sets().entry_set_for(loc.block.index()).to_owned(); - trans.apply(&mut state); - state -} - pub struct DataflowAnalysis<'a, 'tcx, O> where O: BitDenotation<'tcx>, |
