Creates a new `PostOrder` for the given function.
(func: &impl Function)
| 60 | |
| 61 | /// Creates a new `PostOrder` for the given function. |
| 62 | pub fn for_function(func: &impl Function) -> Self { |
| 63 | let mut postorder = Self::new(); |
| 64 | postorder.compute(func); |
| 65 | postorder |
| 66 | } |
| 67 | |
| 68 | /// Returns whether a basic block is reachable from any entry point. |
| 69 | pub fn is_reachable(&self, block: Block) -> bool { |