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).
}
}Re-exportsยง
use rustc_abi::WrappingRange;๐use rustc_const_eval::interpret::Scalar;๐use rustc_data_structures::fx::FxHashMap;๐use rustc_data_structures::graph::dominators::Dominators;๐use rustc_middle::mir::basic_blocks::Predecessors;๐use rustc_middle::mir::visit::MutVisitor;๐use rustc_middle::mir::BasicBlock;๐use rustc_middle::mir::Body;๐use rustc_middle::mir::Location;๐use rustc_middle::mir::Operand;๐use rustc_middle::mir::Place;๐use rustc_middle::mir::TerminatorKind;๐use rustc_middle::ty::TyCtxt;๐use rustc_middle::ty::TypingEnv;๐use rustc_span::DUMMY_SP;๐use crate::PassPolicy;๐use crate::ssa::SsaLocals;๐use rustc_middle::mir::*;๐
Structsยง
- Range
Set ๐ - SsaRange
Propagation ๐