Regalloc: remove the transient LiveRangeContext data structure;
This commit is contained in:
@@ -181,7 +181,7 @@ use crate::ir::dfg::ValueDef;
|
||||
use crate::ir::{Ebb, Function, Inst, Layout, ProgramPoint, Value};
|
||||
use crate::isa::{EncInfo, OperandConstraint, TargetIsa};
|
||||
use crate::regalloc::affinity::Affinity;
|
||||
use crate::regalloc::liverange::{LiveRange, LiveRangeContext, LiveRangeForest};
|
||||
use crate::regalloc::liverange::{LiveRange, LiveRangeForest};
|
||||
use crate::timing;
|
||||
use core::mem;
|
||||
use core::ops::Index;
|
||||
@@ -314,16 +314,16 @@ impl Liveness {
|
||||
}
|
||||
}
|
||||
|
||||
/// Current forest storage.
|
||||
pub fn forest(&self) -> &LiveRangeForest {
|
||||
&self.forest
|
||||
}
|
||||
|
||||
/// Current live ranges.
|
||||
pub fn ranges(&self) -> &LiveRangeSet {
|
||||
&self.ranges
|
||||
}
|
||||
|
||||
/// Get a context needed for working with a `LiveRange`.
|
||||
pub fn context<'a>(&'a self, layout: &'a Layout) -> LiveRangeContext<'a, Layout> {
|
||||
LiveRangeContext::new(layout, &self.forest)
|
||||
}
|
||||
|
||||
/// Clear all data structures in this liveness analysis.
|
||||
pub fn clear(&mut self) {
|
||||
self.ranges.clear();
|
||||
|
||||
Reference in New Issue
Block a user