Skip to main content

Module reachability

Module reachability 

Source
Expand description

Reachability and dominance analysis for einsum graphs.

This module provides graph analysis passes that compute:

  • Reachability: Which nodes can reach which other nodes
  • Dominance: Which nodes dominate others in the control flow
  • Post-dominance: Reverse dominance for optimization

§Overview

Reachability and dominance analysis are fundamental for understanding the structure and dependencies in computation graphs. They enable:

  • Dead code elimination
  • Loop optimization
  • Code motion and hoisting
  • Critical path analysis

§Examples

use tensorlogic_compiler::passes::analyze_reachability;
use tensorlogic_ir::EinsumGraph;

let graph = EinsumGraph::new();
let analysis = analyze_reachability(&graph);

Structs§

DominanceAnalysis
Dominance analysis result.
ReachabilityAnalysis
Result of reachability analysis.

Functions§

analyze_dominance
Analyze dominance in an einsum graph.
analyze_reachability
Analyze reachability in an einsum graph.