From 0b90de2e773f439fa606ddf2bc403d2f42fa4c3d Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 18 Feb 2026 18:17:14 +0100 Subject: ir: basic inlining pass implementation --- ir/ir.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ir/ir.h') diff --git a/ir/ir.h b/ir/ir.h index d32885e..73a50bd 100644 --- a/ir/ir.h +++ b/ir/ir.h @@ -185,8 +185,10 @@ struct function { ushort nabiarg, nabiret; bool globl; bool isleaf; + bool inlin; regset regusage; }; + #define FREQUIRE(_prop) assert((fn->prop & (_prop)) == (_prop) && "preconditions not met") enum objkind { OBJELF }; @@ -311,6 +313,9 @@ bool foldunop(union ref *to, enum op, enum irclass, union ref); /** irdump.c **/ void irdump(struct function *); +/** mem2reg.c **/ +void mem2reg(struct function *); + /** ssa.c **/ void copyopt(struct function *); @@ -328,8 +333,9 @@ void simpl(struct function *); /** cselim.c **/ void cselim(struct function *); -/** mem2reg.c **/ -void mem2reg(struct function *); +/** inliner.c **/ +bool maybeinlinee(struct function *); +void doinline(struct function *); /** intrin.c **/ void lowerintrin(struct function *); -- cgit v1.2.3