From 7b1849402f33938aed8065ac9f4fab2ee8f22966 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 15 Sep 2025 10:46:09 +0200 Subject: a little refactoring and cleanup --- ir.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ir.h') diff --git a/ir.h b/ir.h index 46c7456..08e1ddc 100644 --- a/ir.h +++ b/ir.h @@ -135,7 +135,7 @@ struct use { struct block *blk; ushort u; }; enum { MAXREGS = 64 }; struct function { - struct arena *arena; + struct arena **arena; const char *name; struct block *entry, *curblk; struct use *use; @@ -191,6 +191,7 @@ struct mctarg { enum { MAXINSTR = 1<<14 }; +/** ir.c **/ extern uchar type2cls[]; extern uchar cls2siz[]; extern const uchar siz2intcls[]; @@ -253,15 +254,27 @@ void putbranch(struct function *, struct block *); void putcondbranch(struct function *, union ref arg, struct block *t, struct block *f); void putreturn(struct function *, union ref r0, union ref r1); +/** irdump.c **/ void irdump(struct function *); +/** ssa.c **/ void filluses(struct function *); void copyopt(struct function *); +/** cfg.c **/ +void sortrpo(struct function *fn); + +/** abi0.c **/ void abi0(struct function *); void abi0_call(struct function *, struct instr *, struct block *blk, int *curi); + +/** optmem.c **/ void mem2reg(struct function *); + +/** intrin.c **/ void lowerintrin(struct function *); + +/** regalloc.c **/ void regalloc(struct function *); /* vim:set ts=3 sw=3 expandtab: */ -- cgit v1.2.3