MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / PostOrder

Class PostOrder

src/debug_utils/postorder.rs:17–32  ·  view source on GitHub ↗

Post-order traversal of the control flow graph. This also doubles as a reachability check to determine whether a basic block is reachable from any entry point.

Source from the content-addressed store, hash-verified

15/// This also doubles as a reachability check to determine whether a basic block
16/// is reachable from any entry point.
17pub struct PostOrder {
18 /// Stack used to compute the post-order.
19 stack: Vec<(Visit, Block)>,
20
21 /// List of basic blocks in CFG post-order.
22 postorder: Vec<Block>,
23
24 /// Number of a basic block in the postorder traversal of the control
25 /// flow graph. This number is guranteed to be monotonically increasing for
26 /// each node of the graph but may not be contiguous.
27 ///
28 /// Unreahcable blocks get a value of `UNREACHABLE` (0). `SEEN` is used as a
29 /// marker during processing, but this is later replaced with the actual
30 /// number.
31 po_number: SecondaryMap<Block, u32>,
32}
33
34/// Special value for `po_number` which indicates an unreachable block.
35///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected