aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-21 17:07:28 +0100
committerlemon <lsof@mailbox.org>2025-11-21 17:35:55 +0100
commit87f9753fb776a1fa6e59baef759e4687fb9a1ac7 (patch)
tree192e36f06ac1bda63c3dceced36cb9c8562ca713 /ir/ir.c
parent821adf9e5c962c97e46f3a215c876bc10916e302 (diff)
ir: barebones IR passes checked contracts
Diffstat (limited to 'ir/ir.c')
-rw-r--r--ir/ir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ir/ir.c b/ir/ir.c
index 6a40991..30da628 100644
--- a/ir/ir.c
+++ b/ir/ir.c
@@ -68,6 +68,7 @@ irinit(struct function *fn)
fn->entry = fn->curblk = allocz(fn->arena, sizeof(struct block), 0);
fn->nblk = 1;
fn->entry->lprev = fn->entry->lnext = fn->entry;
+ fn->prop = FNUSE; /* builder keeps this */
}
static int
@@ -552,6 +553,8 @@ fillblkids(struct function *fn)
int i = 0;
struct block *blk = fn->entry;
do blk->id = i++; while ((blk = blk->lnext) != fn->entry);
+
+ fn->prop |= FNBLKID;
}
/** Misc **/