Add a register allocation context module.

Collect the data structures that hang around between function
compilations.

Provide a main entry point to the register allocator passes.
This commit is contained in:
Jakob Stoklund Olesen
2017-02-17 10:55:47 -08:00
parent 8e421d666d
commit bf9cf09622
4 changed files with 83 additions and 1 deletions

View File

@@ -291,7 +291,7 @@ impl Liveness {
/// 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) {
pub fn compute(&mut self, isa: &TargetIsa, func: &Function, cfg: &ControlFlowGraph) {
self.ranges.clear();
// Get ISA data structures used for computing live range affinities.