feat(IR): improve IR functions

Add access specifiers and parameter counts to furlang's IR functions.
This commit is contained in:
2026-06-28 13:21:13 +02:00
parent 7b609f87c9
commit 8466902281
5 changed files with 135 additions and 34 deletions
+4
View File
@@ -546,6 +546,10 @@ static void adce_stage(function_context& ctx) {
if (instr->has_destination() && instr->destination().type() == furlang::ir::operand_t::Register) {
defMap[instr->destination().reg()] = instr.get();
}
if (instr->type() == furlang::ir::instruction_t::Call) {
// TODO: Check if the function has side effects
if (alive.insert(instr.get()).second) worklist.push(instr.get());
}
}
auto* exit = block->exit().get();