summaryrefslogtreecommitdiff
path: root/opt
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-15 12:07:52 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-15 12:07:52 -0400
commitf143320b261f68c3fe03eb42ba5fc4dbc93ecba5 (patch)
tree4d38d5d690a7ca591476c1c78fe48d65654a2455 /opt
parent67bd2a9810f0891b26ed05830a565fa452aa04da (diff)
downloadmc-f143320b261f68c3fe03eb42ba5fc4dbc93ecba5.tar.gz
Add rudimentary constant folding.
Diffstat (limited to 'opt')
-rw-r--r--opt/Makefile1
-rw-r--r--opt/opt.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/opt/Makefile b/opt/Makefile
index 636140a..3dacc1d 100644
--- a/opt/Makefile
+++ b/opt/Makefile
@@ -1,5 +1,6 @@
LIB=libopt.a
OBJ=cfg.o \
+ fold.o \
df.o \
DEPS=../parse/libparse.a
diff --git a/opt/opt.h b/opt/opt.h
index 745dea1..dcdfc62 100644
--- a/opt/opt.h
+++ b/opt/opt.h
@@ -24,6 +24,8 @@ struct Bb {
Bitset *succ;
};
+/* expression folding */
+Node *fold(Node *n);
/* Takes a reduced block, and returns a flow graph. */
Cfg *mkcfg(Node **nl, size_t nn);
void dumpcfg(Cfg *c, FILE *fd);