@@ -60,11 +60,13 @@ impl<A> Results<'tcx, A>
60
60
where
61
61
A : Analysis < ' tcx > ,
62
62
{
63
- pub fn into_cursor ( self , body : & ' mir mir:: Body < ' tcx > ) -> ResultsCursor < ' mir , ' tcx , A > {
63
+ /// Creates a `ResultsCursor` that can inspect these `Results`.
64
+ pub fn into_results_cursor ( self , body : & ' mir mir:: Body < ' tcx > ) -> ResultsCursor < ' mir , ' tcx , A > {
64
65
ResultsCursor :: new ( body, self )
65
66
}
66
67
67
- pub fn on_block_entry ( & self , block : BasicBlock ) -> & BitSet < A :: Idx > {
68
+ /// Gets the entry set for the given block.
69
+ pub fn entry_set_for_block ( & self , block : BasicBlock ) -> & BitSet < A :: Idx > {
68
70
& self . entry_sets [ block]
69
71
}
70
72
}
@@ -288,12 +290,14 @@ pub trait GenKill<T> {
288
290
/// Removes `elem` from the state vector.
289
291
fn kill ( & mut self , elem : T ) ;
290
292
293
+ /// Calls `gen` for each element in `elems`.
291
294
fn gen_all ( & mut self , elems : impl IntoIterator < Item = T > ) {
292
295
for elem in elems {
293
296
self . gen ( elem) ;
294
297
}
295
298
}
296
299
300
+ /// Calls `kill` for each element in `elems`.
297
301
fn kill_all ( & mut self , elems : impl IntoIterator < Item = T > ) {
298
302
for elem in elems {
299
303
self . kill ( elem) ;
@@ -304,7 +308,7 @@ pub trait GenKill<T> {
304
308
/// Stores a transfer function for a gen/kill problem.
305
309
///
306
310
/// Calling `gen`/`kill` on a `GenKillSet` will "build up" a transfer function so that it can be
307
- /// applied to a state vector efficiently. When there are multiple calls to `gen` and/or `kill` for
311
+ /// applied multiple times efficiently. When there are multiple calls to `gen` and/or `kill` for
308
312
/// the same element, the most recent one takes precedence.
309
313
#[ derive( Clone ) ]
310
314
pub struct GenKillSet < T : Idx > {
0 commit comments