aboutsummaryrefslogtreecommitdiff
path: root/src/opt.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-04-03 16:00:15 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-04-03 16:00:15 +0300
commit36de4f902c4eec9f8d918e00cf0bf89d6b670cf5 (patch)
tree6fc1a8f172ac018411f54b24b2d989992b20fe40 /src/opt.c
parenta7cb592efa9ec72c4c5e9d3c1e7469203a4b47e2 (diff)
downloadqbt-36de4f902c4eec9f8d918e00cf0bf89d6b670cf5.tar.gz
qbt-36de4f902c4eec9f8d918e00cf0bf89d6b670cf5.zip
add ssa form
Diffstat (limited to 'src/opt.c')
-rw-r--r--src/opt.c16
1 files changed, 14 insertions, 2 deletions
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 <stdio.h>
+
#include <qbt/opt.h>
#include <qbt/regalloc.h>
-#include <qbt/unreachable.h>
#include <qbt/ssa.h>
#include <qbt/abi.h>
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);
}