@@ -60,11 +60,13 @@ impl<A> Results<'tcx, A>
6060where
6161 A : Analysis < ' tcx > ,
6262{
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 > {
6465 ResultsCursor :: new ( body, self )
6566 }
6667
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 > {
6870 & self . entry_sets [ block]
6971 }
7072}
@@ -288,12 +290,14 @@ pub trait GenKill<T> {
288290 /// Removes `elem` from the state vector.
289291 fn kill ( & mut self , elem : T ) ;
290292
293+ /// Calls `gen` for each element in `elems`.
291294 fn gen_all ( & mut self , elems : impl IntoIterator < Item = T > ) {
292295 for elem in elems {
293296 self . gen ( elem) ;
294297 }
295298 }
296299
300+ /// Calls `kill` for each element in `elems`.
297301 fn kill_all ( & mut self , elems : impl IntoIterator < Item = T > ) {
298302 for elem in elems {
299303 self . kill ( elem) ;
@@ -304,7 +308,7 @@ pub trait GenKill<T> {
304308/// Stores a transfer function for a gen/kill problem.
305309///
306310/// 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
308312/// the same element, the most recent one takes precedence.
309313#[ derive( Clone ) ]
310314pub struct GenKillSet < T : Idx > {
0 commit comments