about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/impls
diff options
context:
space:
mode:
authorJakob Degen <jakob.e.degen@gmail.com>2022-06-05 16:22:54 -0700
committerJakob Degen <jakob.e.degen@gmail.com>2022-06-14 19:41:58 -0700
commitbc7cd2f351ab35e0830563858e827a2d397d176d (patch)
tree00075b320574315ef548e963a7c367c2d50937aa /compiler/rustc_mir_dataflow/src/impls
parent02916c4c75912f70b651c0b20b501444ce2ca231 (diff)
downloadrust-bc7cd2f351ab35e0830563858e827a2d397d176d.tar.gz
rust-bc7cd2f351ab35e0830563858e827a2d397d176d.zip
`BitSet` perf improvements
This commit makes two changes:
 1. Changes `MaybeLiveLocals` to use `ChunkedBitSet`
 2. Overrides the `fold` method for the iterator for `ChunkedBitSet`
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/impls')
-rw-r--r--compiler/rustc_mir_dataflow/src/impls/liveness.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_dataflow/src/impls/liveness.rs b/compiler/rustc_mir_dataflow/src/impls/liveness.rs
index 7076fbe1bdb..51c59e42101 100644
--- a/compiler/rustc_mir_dataflow/src/impls/liveness.rs
+++ b/compiler/rustc_mir_dataflow/src/impls/liveness.rs
@@ -30,14 +30,14 @@ impl MaybeLiveLocals {
 }
 
 impl<'tcx> AnalysisDomain<'tcx> for MaybeLiveLocals {
-    type Domain = BitSet<Local>;
+    type Domain = ChunkedBitSet<Local>;
     type Direction = Backward;
 
     const NAME: &'static str = "liveness";
 
     fn bottom_value(&self, body: &mir::Body<'tcx>) -> Self::Domain {
         // bottom = not live
-        BitSet::new_empty(body.local_decls.len())
+        ChunkedBitSet::new_empty(body.local_decls.len())
     }
 
     fn initialize_start_block(&self, _: &mir::Body<'tcx>, _: &mut Self::Domain) {