weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
//! DF-3  -  Andersen points-to, field-sensitive at struct granularity.
//!
//! Andersen's analysis on the SSA constraint graph reduces to forward
//! transitive closure over subset edges. This façade keeps the public API
//! stable while implementation duties live in focused submodules.

#[cfg(any(test, feature = "cpu-parity"))]
mod oracle;
mod plan;
mod program;
#[cfg(test)]
#[allow(deprecated)]
mod tests;

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

pub(crate) const POINTS_TO_EDGE_MASK: u32 = vyre_primitives::predicate::edge_kind::ASSIGNMENT
    | vyre_primitives::predicate::edge_kind::ALIAS
    | vyre_primitives::predicate::edge_kind::MEM_STORE
    | vyre_primitives::predicate::edge_kind::MEM_LOAD
    | vyre_primitives::predicate::edge_kind::MUT_REF
    | vyre_primitives::predicate::edge_kind::PHI;

crate::define_analysis_family! {
    family: PointsToFamily,
    kind: crate::fixed_point_graph::FixedPointAnalysisKind::PointsToSubset,
    name: "points_to subset_closure_via",
    program_builder: andersen_points_to,
    graph_prep: plan::prepare_points_to_subset_graph,
    graph_prep_scratch: plan::prepare_points_to_subset_graph_with_scratch,
    input_buffer: "pts_in",
    output_buffer: "pts_out",
    closure_prefix: subset_closure,
    resident_prefix: subset_closure_resident,
    word_capacity: "points_to subset_closure",
    frontier_output: "points-to frontier",
    resident_capacity: "points_to subset_closure resident",
    resident_output: "points-to frontier",
    visibility: pub,
}

pub use plan::{
    prepare_points_to_subset_graph, prepare_points_to_subset_graph_into,
    prepare_points_to_subset_plan, prepare_points_to_subset_plan_into,
};
#[allow(deprecated)]
pub use program::{andersen_points_to, andersen_points_to_with_shape, PointsTo};

#[cfg(any(test, feature = "cpu-parity"))]
#[allow(deprecated)]
pub(crate) use oracle::cpu_subset_closure;

#[cfg(test)]
use vyre::ir::Program;
#[cfg(test)]
use vyre_primitives::graph::csr_forward_traverse::bitset_words;
#[cfg(test)]
use vyre_primitives::graph::program_graph::ProgramGraphShape;