mie: ir: implement generation and text output of phi instruction
This commit is contained in:
19
mie/ir/phi.c
Normal file
19
mie/ir/phi.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user