This commit is contained in:
Nilton Constantino
2026-01-28 19:16:41 +00:00
parent 9515bddce8
commit 127ec789bc
8 changed files with 86 additions and 14 deletions
@@ -71,11 +71,10 @@ pub fn lower_function(core_func: &ir_core::Function) -> Result<ir::Function> {
ir_core::Instr::And => ir::InstrKind::And,
ir_core::Instr::Or => ir::InstrKind::Or,
ir_core::Instr::Not => ir::InstrKind::Not,
ir_core::Instr::Alloc | ir_core::Instr::Free | ir_core::Instr::ReadGate | ir_core::Instr::WriteGate => {
// HIP effects are not yet supported in VM IR, so we emit Nop or similar.
// For now, let's use Nop.
ir::InstrKind::Nop
}
ir_core::Instr::Alloc => ir::InstrKind::Alloc,
ir_core::Instr::ReadGate => ir::InstrKind::LoadRef(0),
ir_core::Instr::WriteGate => ir::InstrKind::StoreRef(0),
ir_core::Instr::Free => ir::InstrKind::Nop,
};
vm_func.body.push(ir::Instruction::new(kind, None));
}