rename BitSet
to DenseBitSet
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
This commit is contained in:
parent
7e4077d06f
commit
a13354bea0
67 changed files with 367 additions and 356 deletions
|
@ -2,7 +2,7 @@
|
|||
//! which do not.
|
||||
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::bit_set::DenseBitSet;
|
||||
use rustc_index::{IndexSlice, IndexVec};
|
||||
use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{self, DefLocation, Location, TerminatorKind, traversal};
|
||||
|
@ -16,7 +16,7 @@ use crate::traits::*;
|
|||
pub(crate) fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
||||
fx: &FunctionCx<'a, 'tcx, Bx>,
|
||||
traversal_order: &[mir::BasicBlock],
|
||||
) -> BitSet<mir::Local> {
|
||||
) -> DenseBitSet<mir::Local> {
|
||||
let mir = fx.mir;
|
||||
let dominators = mir.basic_blocks.dominators();
|
||||
let locals = mir
|
||||
|
@ -44,7 +44,7 @@ pub(crate) fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
analyzer.visit_basic_block_data(bb, data);
|
||||
}
|
||||
|
||||
let mut non_ssa_locals = BitSet::new_empty(analyzer.locals.len());
|
||||
let mut non_ssa_locals = DenseBitSet::new_empty(analyzer.locals.len());
|
||||
for (local, kind) in analyzer.locals.iter_enumerated() {
|
||||
if matches!(kind, LocalKind::Memory) {
|
||||
non_ssa_locals.insert(local);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::iter;
|
||||
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::bit_set::DenseBitSet;
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::mir::{UnwindTerminateReason, traversal};
|
||||
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, HasTypingEnv, TyAndLayout};
|
||||
|
@ -293,7 +293,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
// So drop the builder of `start_llbb` to avoid having two at the same time.
|
||||
drop(start_bx);
|
||||
|
||||
let mut unreached_blocks = BitSet::new_filled(mir.basic_blocks.len());
|
||||
let mut unreached_blocks = DenseBitSet::new_filled(mir.basic_blocks.len());
|
||||
// Codegen the body of each reachable block using our reverse postorder list.
|
||||
for bb in traversal_order {
|
||||
fx.codegen_block(bb);
|
||||
|
@ -316,7 +316,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
||||
bx: &mut Bx,
|
||||
fx: &mut FunctionCx<'a, 'tcx, Bx>,
|
||||
memory_locals: &BitSet<mir::Local>,
|
||||
memory_locals: &DenseBitSet<mir::Local>,
|
||||
) -> Vec<LocalRef<'tcx, Bx::Value>> {
|
||||
let mir = fx.mir;
|
||||
let mut idx = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue