aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-20 17:42:30 +0100
committerlemon <lsof@mailbox.org>2025-12-20 17:42:30 +0100
commit771554e39c047eec8e0451c5d8d7adbf990d356c (patch)
treecf9b10f44a6cd451746dd519684c6c646c951b87 /ir/ir.c
parent96779975f3b8c73e6e1f1e5a07c8c2e386f353ae (diff)
backend: general simplification pass skeleton
Diffstat (limited to 'ir/ir.c')
-rw-r--r--ir/ir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ir/ir.c b/ir/ir.c
index 8ae41a9..5f1797c 100644
--- a/ir/ir.c
+++ b/ir/ir.c
@@ -221,7 +221,7 @@ addpred(struct block *blk, struct block *p)
xbpush(&blk->_pred, &blk->npred, p);
}
-static void
+void
delpred(struct block *blk, struct block *p)
{
for (int i = 0; i < blk->npred; ++i) {
@@ -640,6 +640,9 @@ irfini(struct function *fn)
mem2reg(fn);
copyopt(fn);
}
+ if (ccopt.o >= OPT1) {
+ simpl(fn);
+ }
if (ccopt.dbg.o) {
bfmt(ccopt.dbgout, "<< Before isel >>\n");
irdump(fn);