Remove ResultsCloned
and ResultsClonedCursor
.
They're now unused.
This commit is contained in:
parent
500e55ba8c
commit
34aa36b266
@ -9,7 +9,7 @@ use std::cmp::Ordering;
|
|||||||
use rustc_index::bit_set::BitSet;
|
use rustc_index::bit_set::BitSet;
|
||||||
use rustc_middle::mir::{self, BasicBlock, Location};
|
use rustc_middle::mir::{self, BasicBlock, Location};
|
||||||
|
|
||||||
use super::{Analysis, Direction, Effect, EffectIndex, EntrySets, Results, ResultsCloned};
|
use super::{Analysis, Direction, Effect, EffectIndex, EntrySets, Results};
|
||||||
|
|
||||||
// `AnalysisResults` is needed as an impl such as the following has an unconstrained type
|
// `AnalysisResults` is needed as an impl such as the following has an unconstrained type
|
||||||
// parameter:
|
// parameter:
|
||||||
@ -40,11 +40,6 @@ where
|
|||||||
type EntrySets = E;
|
type EntrySets = E;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `ResultsCursor` which uses a cloned `Analysis` while borrowing the underlying `Results`. This
|
|
||||||
/// allows multiple cursors over the same `Results`.
|
|
||||||
pub type ResultsClonedCursor<'res, 'mir, 'tcx, A> =
|
|
||||||
ResultsCursor<'mir, 'tcx, A, ResultsCloned<'res, 'tcx, A>>;
|
|
||||||
|
|
||||||
/// Allows random access inspection of the results of a dataflow analysis.
|
/// Allows random access inspection of the results of a dataflow analysis.
|
||||||
///
|
///
|
||||||
/// This cursor only has linear performance within a basic block when its statements are visited in
|
/// This cursor only has linear performance within a basic block when its statements are visited in
|
||||||
|
@ -25,7 +25,7 @@ use super::fmt::DebugWithContext;
|
|||||||
use super::graphviz;
|
use super::graphviz;
|
||||||
use super::{
|
use super::{
|
||||||
visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, GenKillSet,
|
visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, GenKillSet,
|
||||||
JoinSemiLattice, ResultsClonedCursor, ResultsCursor, ResultsVisitor,
|
JoinSemiLattice, ResultsCursor, ResultsVisitor,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
|
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
|
||||||
@ -41,9 +41,6 @@ where
|
|||||||
pub(super) _marker: PhantomData<&'tcx ()>,
|
pub(super) _marker: PhantomData<&'tcx ()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `Results` type with a cloned `Analysis` and borrowed entry sets.
|
|
||||||
pub type ResultsCloned<'res, 'tcx, A> = Results<'tcx, A, &'res EntrySets<'tcx, A>>;
|
|
||||||
|
|
||||||
impl<'tcx, A, E> Results<'tcx, A, E>
|
impl<'tcx, A, E> Results<'tcx, A, E>
|
||||||
where
|
where
|
||||||
A: Analysis<'tcx>,
|
A: Analysis<'tcx>,
|
||||||
@ -81,20 +78,6 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx, A> Results<'tcx, A>
|
|
||||||
where
|
|
||||||
A: Analysis<'tcx> + Copy,
|
|
||||||
{
|
|
||||||
/// Creates a `ResultsCursor` that can inspect these `Results`.
|
|
||||||
pub fn cloned_results_cursor<'mir>(
|
|
||||||
&self,
|
|
||||||
body: &'mir mir::Body<'tcx>,
|
|
||||||
) -> ResultsClonedCursor<'_, 'mir, 'tcx, A> {
|
|
||||||
Results { analysis: self.analysis, entry_sets: &self.entry_sets, _marker: PhantomData }
|
|
||||||
.into_results_cursor(body)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A solver for dataflow problems.
|
/// A solver for dataflow problems.
|
||||||
pub struct Engine<'mir, 'tcx, A>
|
pub struct Engine<'mir, 'tcx, A>
|
||||||
where
|
where
|
||||||
|
@ -45,9 +45,9 @@ pub mod graphviz;
|
|||||||
pub mod lattice;
|
pub mod lattice;
|
||||||
mod visitor;
|
mod visitor;
|
||||||
|
|
||||||
pub use self::cursor::{ResultsClonedCursor, ResultsCursor};
|
pub use self::cursor::ResultsCursor;
|
||||||
pub use self::direction::{Backward, Direction, Forward};
|
pub use self::direction::{Backward, Direction, Forward};
|
||||||
pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
|
pub use self::engine::{Engine, EntrySets, Results};
|
||||||
pub use self::lattice::{JoinSemiLattice, MaybeReachable};
|
pub use self::lattice::{JoinSemiLattice, MaybeReachable};
|
||||||
pub use self::visitor::{visit_results, ResultsVisitable, ResultsVisitor};
|
pub use self::visitor::{visit_results, ResultsVisitable, ResultsVisitor};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user