aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir
diff options
context:
space:
mode:
Diffstat (limited to 'ir')
-rw-r--r--ir/builder.c2
-rw-r--r--ir/regalloc.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ir/builder.c b/ir/builder.c
index 3ddb5a6..36f955c 100644
--- a/ir/builder.c
+++ b/ir/builder.c
@@ -218,7 +218,7 @@ useblk(struct function *fn, struct block *blk)
blk->lnext = fn->entry;
blk->lprev = fn->entry->lprev;
blk->lprev->lnext = blk;
- blk->id = ++fn->nblk;
+ blk->id = fn->nblk++;
fn->entry->lprev = blk;
}
fn->curblk = blk;
diff --git a/ir/regalloc.c b/ir/regalloc.c
index 691793e..794cdd6 100644
--- a/ir/regalloc.c
+++ b/ir/regalloc.c
@@ -1233,6 +1233,8 @@ fini(struct rega *ra)
freeblk(fn, blk);
--id;
}
+ } else if (allnops) {
+ vfree(&blk->ins);
}
} while ((blk = blk->lnext) != fn->entry);
}