aboutsummaryrefslogtreecommitdiffhomepage
path: root/irdump.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-21 23:52:23 +0200
committerlemon <lsof@mailbox.org>2023-06-21 23:52:23 +0200
commit3f2221dfb9ab33b7ac44bbf822a78753a0357d25 (patch)
tree5828192184328e405da0489d72d1c71a4be70316 /irdump.c
parent995fd23ecd5de710a6f587d29af2874b1fb4756d (diff)
mem2reg: implement ssa construction; this breaks regalloc right now
Diffstat (limited to 'irdump.c')
-rw-r--r--irdump.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/irdump.c b/irdump.c
index 16f3063..5835c81 100644
--- a/irdump.c
+++ b/irdump.c
@@ -73,6 +73,12 @@ dumpref(enum op o, union ref ref)
{
struct xcon *con;
switch (ref.t) {
+ case RNONE:
+ if (ref.bits == UNDREF.bits)
+ efmt("undef");
+ else
+ efmt("??");
+ break;
case RTMP:
if (instrtab[ref.i].reg)
efmt("%s", mctarg->rnames[instrtab[ref.i].reg - 1]);
@@ -191,6 +197,7 @@ dumpblk(struct function *fn, struct block *blk)
for (i = 0; i < blk->phi.n; ++i) {
struct instr *phi = &instrtab[blk->phi.p[i]];
union ref *refs = phitab.p[phi->l.i];
+ assert(phi->op == Ophi);
efmt(" %s %%%d = phi ", clsname[phi->cls], blk->phi.p[i]);
for (int i = 0; i < blk->npred; ++i) {
if (i) efmt(", ");