Skip to main content

Module reaching

Module reaching 

Source
Expand description

Reaching definitions analysis (DF-2).

Prepare a graph for forward reaching-definitions closure:

use weir::reaching::prepare_reaching_graph;

let graph = prepare_reaching_graph(
    2,
    &[0, 1, 1],
    &[1],
    &[0xFFFF_FFFF],
).unwrap();
assert_eq!(graph.node_count(), 2);
assert_eq!(graph.edge_count(), 1);

DF-2 - reaching definitions.

Classical forward monotone dataflow over the CFG. This façade keeps the public reaching API stable while program construction, CPU oracle, closure execution, graph planning, resident execution, and tests live in focused modules.

Structs§

ReachingDefs
Marker type for the reaching-definitions dataflow primitive.
ReachingFamily

Functions§

prepare_reaching_graph
prepare_reaching_graph_into
Repack invariant reaching graph buffers into an existing prepared graph.
prepare_reaching_graph_into_with_scratch
Repack invariant reaching graph buffers into an existing prepared graph using caller-owned scratch for edge-kind filtering.
prepare_reaching_graph_with_scratch
Prepare invariant reaching graph buffers using caller-owned scratch for edge-kind filtering.
prepare_reaching_plan
Prepare invariant reaching graph buffers and emitted Program once.
prepare_reaching_plan_into
Repack reaching graph buffers and refresh the emitted Program in place.
prepare_reaching_plan_into_with_scratch
Repack reaching graph buffers and refresh the emitted Program in place using caller-owned scratch for edge-kind filtering.
prepare_reaching_plan_with_scratch
Prepare invariant reaching graph buffers and emitted Program once using caller-owned scratch for edge-kind filtering.
reaching_closure_borrowed_into_result_with_scratch_via
reaching_closure_borrowed_into_via
reaching_closure_borrowed_into_with_scratch_via
reaching_closure_borrowed_via
reaching_closure_evidence_via
GPU reaching-definition closure with soundness evidence.
reaching_closure_plan_borrowed_into_result_with_scratch_via
reaching_closure_plan_borrowed_into_with_scratch_via
reaching_closure_prepared_borrowed_into_result_with_scratch_via
reaching_closure_prepared_borrowed_into_with_scratch_via
reaching_closure_resident_plan_with_backend_scratch
reaching_closure_resident_plan_with_backend_scratch_into
reaching_closure_resident_plan_with_reusable_frontier_scratch
reaching_closure_resident_plan_with_reusable_frontier_scratch_into
reaching_closure_resident_plan_with_reusable_frontier_scratch_sequence_window
reaching_closure_resident_plan_with_reusable_frontier_scratch_sequence_window_into
reaching_closure_resident_plan_with_scratch
reaching_closure_resident_plan_with_scratch_into
reaching_closure_via
reaching_defs_step
Build one CFG-forward propagation step for reaching-defs.