Expand description
Dominator-tree construction and query (DF-1).
Build a dominator predicate Program:
use weir::dominators::dominates;
let program = dominates(4, "dom_set", "target", "out");dominators - pre-dominator tree (dual of post_dominates).
Given a CFG and an entry node, computes for every node n the
set dom(n) of nodes that dominate n. Used by dataflow consumers for a
dominates($a, $b) predicate to project “every path from entry
to some node in $b passes through a node in $a” onto the per-
node bitset the GPU primitive consumes.
§Shape contract
Inputs:
node_count: total node count.dom_set: per-node bitset where bitmof noden’s row is set iffndominatesm. Production construction uses the GPU-resident fixed-point step in this module; [compute_cpu] remains only as a parity oracle.target_set: bitset of target nodes the predicate queries.out: bitset; bitnset iffndominates SOME target.
The query projection matches post_dominates: a single bitset_and
step over a dominator matrix built by GPU fixed-point construction.
Structs§
- Dominators
- Soundness marker.
Functions§
- dominates
- Build a dominator query Program. Inputs as documented above.