Reset all internal data structures and compute a post-order of the control flow graph. This leaves `rpo_number == 1` for all reachable blocks, 0 for unreachable ones.
(&mut self, func: &Function)
| 247 | /// |
| 248 | /// This leaves `rpo_number == 1` for all reachable blocks, 0 for unreachable ones. |
| 249 | fn compute_postorder(&mut self, func: &Function) { |
| 250 | self.clear(); |
| 251 | self.nodes.resize(func.dfg.num_blocks()); |
| 252 | self.postorder.extend(self.dfs.post_order_iter(func)); |
| 253 | } |
| 254 | |
| 255 | /// Build a dominator tree from a control flow graph using Keith D. Cooper's |
| 256 | /// "Simple, Fast Dominator Algorithm." |
no test coverage detected