summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-09 14:32:07 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-09 14:32:07 -0400
commitabe45f1ab06229d51a1f62bf0569ae99b804823b (patch)
tree2138b921ec69a2eab65588d17fee7cea954a1eec /main.c
parentd8770d112bcee4c9df1cb4276780bddc818de5a4 (diff)
downloadroux-abe45f1ab06229d51a1f62bf0569ae99b804823b.tar.gz
enable constant folding
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index d568621..1f1315f 100644
--- a/main.c
+++ b/main.c
@@ -11,6 +11,7 @@ char debug['Z'+1] = {
 	['M'] = 0, /* memory optimization */
 	['N'] = 0, /* ssa construction */
 	['C'] = 0, /* copy elimination */
+	['F'] = 0, /* constant folding */
 	['S'] = 0, /* spilling */
 	['R'] = 0, /* reg. allocation */
 };
@@ -48,6 +49,8 @@ func(Fn *fn)
 	ssa(fn);
 	filluse(fn);
 	copy(fn);
+	filluse(fn);
+	fold(fn);
 	abi(fn);
 	filluse(fn);
 	isel(fn);