MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / rpo_cmp

Method rpo_cmp

cranelift/codegen/src/dominator_tree/simple.rs:89–98  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers

nothing calls this directly

Calls 3

rpo_cmp_blockMethod · 0.80
pp_blockMethod · 0.80
pp_cmpMethod · 0.80

Tested by

no test coverage detected