Perform a depth-first traversal over the given function. Yields pairs of `(Event, ir::Block)`. This iterator can be used to perform either pre- or post-order traversals, or a combination of the two.
(&'a mut self, func: &'a ir::Function)
| 52 | /// This iterator can be used to perform either pre- or post-order |
| 53 | /// traversals, or a combination of the two. |
| 54 | pub fn iter<'a>(&'a mut self, func: &'a ir::Function) -> DfsIter<'a> { |
| 55 | self.clear(); |
| 56 | if let Some(e) = func.layout.entry_block() { |
| 57 | self.stack.push((Event::Enter, e)); |
| 58 | } |
| 59 | DfsIter { dfs: self, func } |
| 60 | } |
| 61 | |
| 62 | /// Perform a pre-order traversal over the given function. |
| 63 | /// |
no test coverage detected