aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-02-18 18:17:14 +0100
committerlemon <lsof@mailbox.org>2026-02-18 18:19:11 +0100
commit0b90de2e773f439fa606ddf2bc403d2f42fa4c3d (patch)
tree2b7b6600d8bbbe08735c1f2d6d3e6b2885c0e5e0 /ir/ir.h
parent886fdfe8c856ee778103661b832b28cf3e6aed7e (diff)
ir: basic inlining pass implementation
Diffstat (limited to 'ir/ir.h')
-rw-r--r--ir/ir.h10
1 files changed, 8 insertions, 2 deletions
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 *);