Skip to main content

Module ssa_range_prop

Module ssa_range_prop 

Source
Expand description

A pass that propagates the known ranges of SSA locals. We can know the ranges of SSA locals in certain locations for the following code:

fn foo(a: u32) {
  let b = a < 9; // the integer representation of b is within the full range [0, 2).
  if b {
    let c = b; // c is true since b is within the range [1, 2).
    let d = a < 8; // d is true since a is within the range [0, 9).
  }
}

Structsยง

RangeSet ๐Ÿ”’
SsaRangePropagation ๐Ÿ”’