11
11
//! An analysis to determine which locals require allocas and
12
12
//! which do not.
13
13
14
- use rustc_data_structures:: bitvec:: BitVector ;
14
+ use rustc_data_structures:: bitvec:: BitArray ;
15
15
use rustc_data_structures:: graph:: dominators:: Dominators ;
16
16
use rustc_data_structures:: indexed_vec:: { Idx , IndexVec } ;
17
17
use rustc:: mir:: { self , Location , TerminatorKind } ;
@@ -22,7 +22,7 @@ use rustc::ty::layout::LayoutOf;
22
22
use type_of:: LayoutLlvmExt ;
23
23
use super :: FunctionCx ;
24
24
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 > {
26
26
let mir = fx. mir ;
27
27
let mut analyzer = LocalAnalyzer :: new ( fx) ;
28
28
@@ -54,7 +54,7 @@ pub fn non_ssa_locals(fx: &FunctionCx<'a, 'll, 'tcx>) -> BitVector<mir::Local> {
54
54
struct LocalAnalyzer < ' mir , ' a : ' mir , ' ll : ' a , ' tcx : ' ll > {
55
55
fx : & ' mir FunctionCx < ' a , ' ll , ' tcx > ,
56
56
dominators : Dominators < mir:: BasicBlock > ,
57
- non_ssa_locals : BitVector < mir:: Local > ,
57
+ non_ssa_locals : BitArray < mir:: Local > ,
58
58
// The location of the first visited direct assignment to each
59
59
// local, or an invalid location (out of bounds `block` index).
60
60
first_assignment : IndexVec < mir:: Local , Location >
@@ -67,7 +67,7 @@ impl LocalAnalyzer<'mir, 'a, 'll, 'tcx> {
67
67
let mut analyzer = LocalAnalyzer {
68
68
fx,
69
69
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 ( ) ) ,
71
71
first_assignment : IndexVec :: from_elem ( invalid_location, & fx. mir . local_decls )
72
72
} ;
73
73
0 commit comments