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