@@ -56,7 +56,7 @@ mod visitor;
56
56
pub use self :: cursor:: ResultsCursor ;
57
57
pub use self :: direction:: { Backward , Direction , Forward } ;
58
58
pub use self :: lattice:: { JoinSemiLattice , MaybeReachable } ;
59
- pub use self :: results:: { EntrySets , Results } ;
59
+ pub use self :: results:: { EntryStates , Results } ;
60
60
pub use self :: visitor:: { ResultsVisitor , visit_results} ;
61
61
62
62
/// Analysis domains are all bitsets of various kinds. This trait holds
@@ -234,11 +234,12 @@ pub trait Analysis<'tcx> {
234
234
Self : Sized ,
235
235
Self :: Domain : DebugWithContext < Self > ,
236
236
{
237
- let mut entry_sets =
237
+ let mut entry_states =
238
238
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 ] ) ;
240
240
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
+ {
242
243
bug ! ( "`initialize_start_block` is not yet supported for backward dataflow analyses" ) ;
243
244
}
244
245
@@ -262,9 +263,9 @@ pub trait Analysis<'tcx> {
262
263
let mut state = self . bottom_value ( body) ;
263
264
while let Some ( bb) = dirty_queue. pop ( ) {
264
265
// 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()`,
266
267
// but it saves an allocation, thus improving compile times.
267
- state. clone_from ( & entry_sets [ bb] ) ;
268
+ state. clone_from ( & entry_states [ bb] ) ;
268
269
269
270
Self :: Direction :: apply_effects_in_block (
270
271
& mut self ,
@@ -273,15 +274,15 @@ pub trait Analysis<'tcx> {
273
274
bb,
274
275
& body[ bb] ,
275
276
|target : BasicBlock , state : & Self :: Domain | {
276
- let set_changed = entry_sets [ target] . join ( state) ;
277
+ let set_changed = entry_states [ target] . join ( state) ;
277
278
if set_changed {
278
279
dirty_queue. insert ( target) ;
279
280
}
280
281
} ,
281
282
) ;
282
283
}
283
284
284
- let mut results = Results { analysis : self , entry_sets } ;
285
+ let mut results = Results { analysis : self , entry_states } ;
285
286
286
287
if tcx. sess . opts . unstable_opts . dump_mir_dataflow {
287
288
let res = write_graphviz_results ( tcx, body, & mut results, pass_name) ;
0 commit comments