@@ -56,7 +56,7 @@ mod visitor;
5656pub use self :: cursor:: ResultsCursor ;
5757pub use self :: direction:: { Backward , Direction , Forward } ;
5858pub use self :: lattice:: { JoinSemiLattice , MaybeReachable } ;
59- pub use self :: results:: { EntrySets , Results } ;
59+ pub use self :: results:: { EntryStates , Results } ;
6060pub use self :: visitor:: { ResultsVisitor , visit_results} ;
6161
6262/// Analysis domains are all bitsets of various kinds. This trait holds
@@ -234,11 +234,12 @@ pub trait Analysis<'tcx> {
234234 Self : Sized ,
235235 Self :: Domain : DebugWithContext < Self > ,
236236 {
237- let mut entry_sets =
237+ let mut entry_states =
238238 IndexVec :: from_fn_n ( |_| self . bottom_value ( body) , body. basic_blocks . len ( ) ) ;
239- self . initialize_start_block ( body, & mut entry_sets [ mir:: START_BLOCK ] ) ;
239+ self . initialize_start_block ( body, & mut entry_states [ mir:: START_BLOCK ] ) ;
240240
241- if Self :: Direction :: IS_BACKWARD && entry_sets[ mir:: START_BLOCK ] != self . bottom_value ( body) {
241+ if Self :: Direction :: IS_BACKWARD && entry_states[ mir:: START_BLOCK ] != self . bottom_value ( body)
242+ {
242243 bug ! ( "`initialize_start_block` is not yet supported for backward dataflow analyses" ) ;
243244 }
244245
@@ -262,9 +263,9 @@ pub trait Analysis<'tcx> {
262263 let mut state = self . bottom_value ( body) ;
263264 while let Some ( bb) = dirty_queue. pop ( ) {
264265 // Set the state to the entry state of the block.
265- // This is equivalent to `state = entry_sets [bb].clone()`,
266+ // This is equivalent to `state = entry_states [bb].clone()`,
266267 // but it saves an allocation, thus improving compile times.
267- state. clone_from ( & entry_sets [ bb] ) ;
268+ state. clone_from ( & entry_states [ bb] ) ;
268269
269270 Self :: Direction :: apply_effects_in_block (
270271 & mut self ,
@@ -273,15 +274,15 @@ pub trait Analysis<'tcx> {
273274 bb,
274275 & body[ bb] ,
275276 |target : BasicBlock , state : & Self :: Domain | {
276- let set_changed = entry_sets [ target] . join ( state) ;
277+ let set_changed = entry_states [ target] . join ( state) ;
277278 if set_changed {
278279 dirty_queue. insert ( target) ;
279280 }
280281 } ,
281282 ) ;
282283 }
283284
284- let mut results = Results { analysis : self , entry_sets } ;
285+ let mut results = Results { analysis : self , entry_states } ;
285286
286287 if tcx. sess . opts . unstable_opts . dump_mir_dataflow {
287288 let res = write_graphviz_results ( tcx, body, & mut results, pass_name) ;
0 commit comments