Commit 6495a919 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Merge branch 'develop' of gitlab.anu.edu.au:mu/mu-impl-fast into develop

parents a3a362ab 7a7a4086
Pipeline #733 passed with stages
in 28 minutes and 52 seconds
......@@ -363,7 +363,8 @@ pub fn build_interference_graph_chaitin_briggs(cf: &mut CompiledFunction, func:
trace_if!(TRACE_LIVENESS, "Block{}: Inst{}: src={:?}", block, i, src);
// for every definition D in I
for d in cf.mc().get_inst_reg_defines(i) {
let defines = cf.mc().get_inst_reg_defines(i);
for d in defines.clone() {
trace_if!(TRACE_LIVENESS, "Block{}: Inst{}: for definition {}",
block, i, func.context.get_temp_display(d));
// add an interference from D to every element E in Current_Live - {D}
......@@ -393,6 +394,22 @@ pub fn build_interference_graph_chaitin_briggs(cf: &mut CompiledFunction, func:
}
}
}
// D also interferes with other definition D_ in I
for d_ in defines.iter() {
let node1 = ig.get_node(d);
let node2 = ig.get_node(*d_);
// if D and D_ are not the same node, not already interfered, and in the same reg group
// we add an intereference edge between them
if !ig.is_same_node(node1, node2) && ig.is_same_group(node1, node2) && !ig.is_adj(node1, node2){
trace_if!(TRACE_LIVENESS, "Block{}: Inst{}: add intereference between {} and {}",
block, i,
func.context.get_temp_display(d),
func.context.get_temp_display(*d_));
ig.add_interference_edge(node1, node2);
}
}
}
// for every definition D in I
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment