Skip to content

Commit

Permalink
Remove ChunkedBitSet impls that are no longer needed.
Browse files Browse the repository at this point in the history
`ChunkedBitSet` is no longer used directly by dataflow analyses, with
`MixedBitSet` replacing it in those contexts.
  • Loading branch information
nnethercote committed Dec 8, 2024
1 parent 34f45f0 commit fa6ceba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
8 changes: 1 addition & 7 deletions compiler/rustc_mir_dataflow/src/framework/lattice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
use std::iter;

use rustc_index::bit_set::{BitSet, ChunkedBitSet, MixedBitSet};
use rustc_index::bit_set::{BitSet, MixedBitSet};
use rustc_index::{Idx, IndexVec};

use crate::framework::BitSetExt;
Expand Down Expand Up @@ -126,12 +126,6 @@ impl<T: Idx> JoinSemiLattice for BitSet<T> {
}
}

impl<T: Idx> JoinSemiLattice for ChunkedBitSet<T> {
fn join(&mut self, other: &Self) -> bool {
self.union(other)
}
}

impl<T: Idx> JoinSemiLattice for MixedBitSet<T> {
fn join(&mut self, other: &Self) -> bool {
self.union(other)
Expand Down
18 changes: 1 addition & 17 deletions compiler/rustc_mir_dataflow/src/framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
use std::cmp::Ordering;

use rustc_data_structures::work_queue::WorkQueue;
use rustc_index::bit_set::{BitSet, ChunkedBitSet, MixedBitSet};
use rustc_index::bit_set::{BitSet, MixedBitSet};
use rustc_index::{Idx, IndexVec};
use rustc_middle::bug;
use rustc_middle::mir::{self, BasicBlock, CallReturnPlaces, Location, TerminatorEdges, traversal};
Expand Down Expand Up @@ -71,12 +71,6 @@ impl<T: Idx> BitSetExt<T> for BitSet<T> {
}
}

impl<T: Idx> BitSetExt<T> for ChunkedBitSet<T> {
fn contains(&self, elem: T) -> bool {
self.contains(elem)
}
}

impl<T: Idx> BitSetExt<T> for MixedBitSet<T> {
fn contains(&self, elem: T) -> bool {
self.contains(elem)
Expand Down Expand Up @@ -333,16 +327,6 @@ impl<T: Idx> GenKill<T> for BitSet<T> {
}
}

impl<T: Idx> GenKill<T> for ChunkedBitSet<T> {
fn gen_(&mut self, elem: T) {
self.insert(elem);
}

fn kill(&mut self, elem: T) {
self.remove(elem);
}
}

impl<T: Idx> GenKill<T> for MixedBitSet<T> {
fn gen_(&mut self, elem: T) {
self.insert(elem);
Expand Down

0 comments on commit fa6ceba

Please sign in to comment.