diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-07 15:19:05 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-11 11:34:01 +0000 |
| commit | a13354bea05968799a5be5521691322274fa6a9e (patch) | |
| tree | e8e27ef15e991c493c152623adefa78ec0f64eab /compiler/rustc_mir_transform/src/inline.rs | |
| parent | 7e4077d06fc073442c567d58885b47ed2c5121b8 (diff) | |
| download | rust-a13354bea05968799a5be5521691322274fa6a9e.tar.gz rust-a13354bea05968799a5be5521691322274fa6a9e.zip | |
rename `BitSet` to `DenseBitSet`
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index e4daa2b9757..470393c9ae1 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -8,7 +8,7 @@ use rustc_attr_parsing::InlineAttr; use rustc_hir::def::DefKind; use rustc_hir::def_id::DefId; use rustc_index::Idx; -use rustc_index::bit_set::BitSet; +use rustc_index::bit_set::DenseBitSet; use rustc_middle::bug; use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs; use rustc_middle::mir::visit::*; @@ -369,7 +369,7 @@ impl<'tcx> Inliner<'tcx> for NormalInliner<'tcx> { // Traverse the MIR manually so we can account for the effects of inlining on the CFG. let mut work_list = vec![START_BLOCK]; - let mut visited = BitSet::new_empty(callee_body.basic_blocks.len()); + let mut visited = DenseBitSet::new_empty(callee_body.basic_blocks.len()); while let Some(bb) = work_list.pop() { if !visited.insert(bb.index()) { continue; @@ -885,7 +885,7 @@ fn inline_call<'tcx, I: Inliner<'tcx>>( in_cleanup_block: false, return_block, tcx, - always_live_locals: BitSet::new_filled(callee_body.local_decls.len()), + always_live_locals: DenseBitSet::new_filled(callee_body.local_decls.len()), }; // Map all `Local`s, `SourceScope`s and `BasicBlock`s to new ones @@ -1127,7 +1127,7 @@ struct Integrator<'a, 'tcx> { in_cleanup_block: bool, return_block: Option<BasicBlock>, tcx: TyCtxt<'tcx>, - always_live_locals: BitSet<Local>, + always_live_locals: DenseBitSet<Local>, } impl Integrator<'_, '_> { |
