Compare two program points relative to a reverse post-order traversal of the control-flow graph. Return `Ordering::Less` if `a` comes before `b` in the RPO. If `a` and `b` belong to the same block, compare their relative position in the block.
(&self, a: A, b: B, layout: &Layout)
| 87 | /// |
| 88 | /// If `a` and `b` belong to the same block, compare their relative position in the block. |
| 89 | pub fn rpo_cmp<A, B>(&self, a: A, b: B, layout: &Layout) -> Ordering |
| 90 | where |
| 91 | A: Into<ProgramPoint>, |
| 92 | B: Into<ProgramPoint>, |
| 93 | { |
| 94 | let a = a.into(); |
| 95 | let b = b.into(); |
| 96 | self.rpo_cmp_block(layout.pp_block(a), layout.pp_block(b)) |
| 97 | .then_with(|| layout.pp_cmp(a, b)) |
| 98 | } |
| 99 | |
| 100 | /// Returns `true` if `a` dominates `b`. |
| 101 | /// |
nothing calls this directly
no test coverage detected