File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5009,20 +5009,20 @@ impl Function {
50095009
50105010 /// Return a traversal of the `Function`'s `BlockId`s in reverse post-order.
50115011 pub fn rpo ( & self ) -> Vec < BlockId > {
5012- let mut result = self . po_from ( vec ! [ self . entries_block] ) ;
5012+ let mut result = self . po_from ( self . entries_block ) ;
50135013 result. reverse ( ) ;
50145014 result
50155015 }
50165016
5017- fn po_from ( & self , starts : Vec < BlockId > ) -> Vec < BlockId > {
5017+ fn po_from ( & self , start : BlockId ) -> Vec < BlockId > {
50185018 #[ derive( PartialEq ) ]
50195019 enum Action {
50205020 VisitEdges ,
50215021 VisitSelf ,
50225022 }
50235023 let mut result = vec ! [ ] ;
50245024 let mut seen = BlockSet :: with_capacity ( self . blocks . len ( ) ) ;
5025- let mut stack: Vec < _ > = starts . iter ( ) . map ( | & start| ( start , Action :: VisitEdges ) ) . collect ( ) ;
5025+ let mut stack = vec ! [ ( start, Action :: VisitEdges ) ] ;
50265026 while let Some ( ( block, action) ) = stack. pop ( ) {
50275027 if action == Action :: VisitSelf {
50285028 result. push ( block) ;
You can’t perform that action at this time.
0 commit comments