diff --git a/dmc-lib/src/ir/register_allocation.rs b/dmc-lib/src/ir/register_allocation.rs index f3f270d..210d64d 100644 --- a/dmc-lib/src/ir/register_allocation.rs +++ b/dmc-lib/src/ir/register_allocation.rs @@ -55,7 +55,7 @@ fn block_live_in_live_out(ir_block: &IrBlock) -> (LivenessSets, LivenessSets) { // in: use(s) U ( out(s) - def(s) ) let use_s = collect_statement_vr_uses(ir_statement); let out_s = &live_out[statement_index]; - let def_s = collect_statement_vr_uses(ir_statement); + let def_s = collect_statement_vr_definitions(ir_statement); let rhs = out_s - &def_s; let new_ins = use_s.union(&rhs).map(|v| *v).collect::>(); @@ -181,7 +181,7 @@ fn collect_statement_vr_definitions(statement: &IrStatement) -> HashSet HashSet { let mut vr_collector = VrCollector::new(); - statement.vr_definitions(&mut vr_collector); + statement.vr_uses(&mut vr_collector); vr_collector.take_vrs() }