Skip to content

Commit

Permalink
Stop using HybridBitSet in dataflow diffs.
Browse files Browse the repository at this point in the history
As part of the larger goal of reducing `HybridBitSet` use in general.
This code is for debugging only and isn't performance sensitive, so
`ChunkedBitSet` should be fine.
  • Loading branch information
nnethercote committed Nov 29, 2024
1 parent 346929c commit 0df6a01
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compiler/rustc_mir_dataflow/src/framework/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::fmt;

use rustc_index::Idx;
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
use rustc_index::bit_set::{BitSet, ChunkedBitSet};

use super::lattice::MaybeReachable;

Expand Down Expand Up @@ -85,8 +85,8 @@ where
let size = self.domain_size();
assert_eq!(size, old.domain_size());

let mut set_in_self = HybridBitSet::new_empty(size);
let mut cleared_in_self = HybridBitSet::new_empty(size);
let mut set_in_self = ChunkedBitSet::new_empty(size);
let mut cleared_in_self = ChunkedBitSet::new_empty(size);

for i in (0..size).map(T::new) {
match (self.contains(i), old.contains(i)) {
Expand All @@ -112,8 +112,8 @@ where
let size = self.domain_size();
assert_eq!(size, old.domain_size());

let mut set_in_self = HybridBitSet::new_empty(size);
let mut cleared_in_self = HybridBitSet::new_empty(size);
let mut set_in_self = ChunkedBitSet::new_empty(size);
let mut cleared_in_self = ChunkedBitSet::new_empty(size);

for i in (0..size).map(T::new) {
match (self.contains(i), old.contains(i)) {
Expand Down Expand Up @@ -159,8 +159,8 @@ where
}

fn fmt_diff<T, C>(
inserted: &HybridBitSet<T>,
removed: &HybridBitSet<T>,
inserted: &ChunkedBitSet<T>,
removed: &ChunkedBitSet<T>,
ctxt: &C,
f: &mut fmt::Formatter<'_>,
) -> fmt::Result
Expand Down

0 comments on commit 0df6a01

Please sign in to comment.