1111//! An analysis to determine which locals require allocas and
1212//! which do not.
1313
14- use rustc_data_structures:: bitvec:: BitVector ;
14+ use rustc_data_structures:: bitvec:: BitArray ;
1515use rustc_data_structures:: graph:: dominators:: Dominators ;
1616use rustc_data_structures:: indexed_vec:: { Idx , IndexVec } ;
1717use rustc:: mir:: { self , Location , TerminatorKind } ;
@@ -22,7 +22,7 @@ use rustc::ty::layout::LayoutOf;
2222use type_of:: LayoutLlvmExt ;
2323use super :: FunctionCx ;
2424
25- pub fn non_ssa_locals ( fx : & FunctionCx < ' a , ' ll , ' tcx > ) -> BitVector < mir:: Local > {
25+ pub fn non_ssa_locals ( fx : & FunctionCx < ' a , ' ll , ' tcx > ) -> BitArray < mir:: Local > {
2626 let mir = fx. mir ;
2727 let mut analyzer = LocalAnalyzer :: new ( fx) ;
2828
@@ -54,7 +54,7 @@ pub fn non_ssa_locals(fx: &FunctionCx<'a, 'll, 'tcx>) -> BitVector<mir::Local> {
5454struct LocalAnalyzer < ' mir , ' a : ' mir , ' ll : ' a , ' tcx : ' ll > {
5555 fx : & ' mir FunctionCx < ' a , ' ll , ' tcx > ,
5656 dominators : Dominators < mir:: BasicBlock > ,
57- non_ssa_locals : BitVector < mir:: Local > ,
57+ non_ssa_locals : BitArray < mir:: Local > ,
5858 // The location of the first visited direct assignment to each
5959 // local, or an invalid location (out of bounds `block` index).
6060 first_assignment : IndexVec < mir:: Local , Location >
@@ -67,7 +67,7 @@ impl LocalAnalyzer<'mir, 'a, 'll, 'tcx> {
6767 let mut analyzer = LocalAnalyzer {
6868 fx,
6969 dominators : fx. mir . dominators ( ) ,
70- non_ssa_locals : BitVector :: new ( fx. mir . local_decls . len ( ) ) ,
70+ non_ssa_locals : BitArray :: new ( fx. mir . local_decls . len ( ) ) ,
7171 first_assignment : IndexVec :: from_elem ( invalid_location, & fx. mir . local_decls )
7272 } ;
7373
0 commit comments