weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
//! `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 bit `m` of node `n`'s row is
//!   set iff `n` dominates `m`. 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; bit `n` set iff `n` dominates SOME target.
//!
//! The query projection matches `post_dominates`: a single `bitset_and`
//! step over a dominator matrix built by GPU fixed-point construction.

#[cfg(any(test, feature = "cpu-parity"))]
mod cpu_oracle;
mod dispatch;
mod program;
mod registry;
mod tag;

#[cfg(test)]
mod tests;

pub(crate) const OP_ID: &str = "weir::dominators";

#[cfg(any(test, feature = "cpu-parity"))]
#[allow(deprecated)]
pub(crate) use cpu_oracle::cpu_ref;
#[cfg(any(test, feature = "cpu-parity"))]
#[allow(deprecated)]
pub(crate) use cpu_oracle::{compute_bitmap_bytes, compute_cpu};
#[cfg(test)]
#[allow(deprecated)]
pub(crate) use dispatch::compute_borrowed_into_via;
#[cfg(any(test, feature = "cpu-parity"))]
#[allow(deprecated)]
pub(crate) use dispatch::compute_via;
pub use program::dominates;
#[cfg(any(test, feature = "cpu-parity"))]
pub(crate) use program::dominator_step;
pub use tag::Dominators;