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

View File

@@ -2,6 +2,7 @@
#include <mie/ir/instr.h>
#include <mie/ir/msg.h>
#include <mie/ir/op.h>
#include <mie/ir/phi.h>
#include <mie/ir/ptr.h>
void mie_instr_init(struct mie_instr *instr, enum mie_instr_type type)
@@ -44,6 +45,10 @@ static struct mie_type *get_type(struct mie_value *v, struct mie_ctx *ctx)
struct mie_msg *msg = (struct mie_msg *)instr;
return msg->msg_ret_type;
}
case MIE_INSTR_PHI: {
struct mie_phi *phi = (struct mie_phi *)instr;
return phi->p_type;
}
default:
return NULL;
}