From 771554e39c047eec8e0451c5d8d7adbf990d356c Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 20 Dec 2025 17:42:30 +0100 Subject: backend: general simplification pass skeleton --- ir/ir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ir/ir.c') 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); -- cgit v1.2.3