From 36de4f902c4eec9f8d918e00cf0bf89d6b670cf5 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 3 Apr 2024 16:00:15 +0300 Subject: add ssa form --- src/opt.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/opt.c') diff --git a/src/opt.c b/src/opt.c index d52c9d0..882587d 100644 --- a/src/opt.c +++ b/src/opt.c @@ -1,14 +1,26 @@ +#include + #include #include -#include #include #include void optimize(struct fn *f) { + printf("\n// initial:\n"); + dump_function(f); + + /* unreachability is done in several steps I guess */ ssa(f); + printf("\n// after SSA:\n"); + dump_function(f); + abi0(f); + printf("\n// after abi0:\n"); + dump_function(f); + /* ... do more stuff ... */ - unreachable(f); regalloc(f); + printf("\n// after regalloc:\n"); + dump_function(f); } -- cgit v1.3