diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-06 22:00:24 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-08-16 18:12:17 +0000 |
| commit | 934a99eb659761353e9b89538bd5de356b0f7dfe (patch) | |
| tree | d5eb80c4e33347e0aee6f8f3f112ecafe25ba385 /compiler/rustc_mir_dataflow/src/framework/mod.rs | |
| parent | 8726cbc75fea8afb2fdffa2edf7a7031524de305 (diff) | |
| download | rust-934a99eb659761353e9b89538bd5de356b0f7dfe.tar.gz rust-934a99eb659761353e9b89538bd5de356b0f7dfe.zip | |
Move domain_size to GenKillAnalysis.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework/mod.rs')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/mod.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs index 58df9b9a768..8ccd57802d7 100644 --- a/compiler/rustc_mir_dataflow/src/framework/mod.rs +++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs @@ -54,17 +54,12 @@ pub use self::visitor::{visit_results, ResultsVisitable, ResultsVisitor}; /// Analysis domains are all bitsets of various kinds. This trait holds /// operations needed by all of them. pub trait BitSetExt<T> { - fn domain_size(&self) -> usize; fn contains(&self, elem: T) -> bool; fn union(&mut self, other: &HybridBitSet<T>); fn subtract(&mut self, other: &HybridBitSet<T>); } impl<T: Idx> BitSetExt<T> for BitSet<T> { - fn domain_size(&self) -> usize { - self.domain_size() - } - fn contains(&self, elem: T) -> bool { self.contains(elem) } @@ -79,10 +74,6 @@ impl<T: Idx> BitSetExt<T> for BitSet<T> { } impl<T: Idx> BitSetExt<T> for ChunkedBitSet<T> { - fn domain_size(&self) -> usize { - self.domain_size() - } - fn contains(&self, elem: T) -> bool { self.contains(elem) } @@ -295,6 +286,8 @@ where pub trait GenKillAnalysis<'tcx>: Analysis<'tcx> { type Idx: Idx; + fn domain_size(&self, body: &mir::Body<'tcx>) -> usize; + /// See `Analysis::apply_statement_effect`. fn statement_effect( &mut self, |
