Live Value Tracker.

Keep track of which values are live and dead as we move through the
instructions in an EBB.
This commit is contained in:
Jakob Stoklund Olesen
2017-02-06 16:54:29 +01:00
parent 6567eca21e
commit e3480987bd
4 changed files with 260 additions and 0 deletions

View File

@@ -284,6 +284,11 @@ impl Liveness {
}
}
/// Get the live range for `value`, if it exists.
pub fn get(&self, value: Value) -> Option<&LiveRange> {
self.ranges.get(value)
}
/// Compute the live ranges of all SSA values used in `func`.
/// This clears out any existing analysis stored in this data structure.
pub fn compute(&mut self, func: &Function, cfg: &ControlFlowGraph, isa: &TargetIsa) {