aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ssa.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/ssa.c
parent821adf9e5c962c97e46f3a215c876bc10916e302 (diff)
ir: barebones IR passes checked contracts
Diffstat (limited to 'ir/ssa.c')
-rw-r--r--ir/ssa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ir/ssa.c b/ir/ssa.c
index 5a3db2f..f6c9d6f 100644
--- a/ir/ssa.c
+++ b/ir/ssa.c
@@ -1,11 +1,11 @@
#include "ir.h"
-/* require use, keeps use */
void
copyopt(struct function *fn)
{
struct block *blk = fn->entry;
+ FREQUIRE(FNUSE);
do {
for (int i = 0; i < blk->ins.n; ++i) {
union ref var = mkref(RTMP, blk->ins.p[i]);
@@ -53,6 +53,8 @@ filluses(struct function *fn)
adduse(blk, USERJUMP, blk->jmp.arg[0]);
adduse(blk, USERJUMP, blk->jmp.arg[1]);
} while ((blk = blk->lnext) != fn->entry);
+
+ fn->prop |= FNUSE;
}
/* vim:set ts=3 sw=3 expandtab: */