mie: ir: implement generation and text output of phi instruction

This commit is contained in:
2025-09-08 15:34:58 +01:00
parent dd0dcc9c0a
commit 32a520e210
6 changed files with 97 additions and 9 deletions

19
mie/ir/phi.c Normal file
View File

@@ -0,0 +1,19 @@
#include <mie/ir/phi.h>
#include <stdlib.h>
#include <string.h>
struct mie_phi_edge *mie_phi_edge_create(
struct mie_block *incoming_block, struct mie_value *value)
{
struct mie_phi_edge *out = malloc(sizeof *out);
if (!out) {
return NULL;
}
memset(out, 0x0, sizeof *out);
out->e_incoming_block = incoming_block;
out->e_value = value;
return out;
}