summaryrefslogtreecommitdiff
path: root/mi/mi.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-08 01:06:17 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-08 01:06:17 -0700
commit3b2a10f280a9c927bd678199a90a96f8cddab89c (patch)
treeac3dbb71a50d046af575f2cda53f68a4acadb248 /mi/mi.h
parent6cf64ac765264c305b91b3062ef8e3525e83add5 (diff)
downloadmc-3b2a10f280a9c927bd678199a90a96f8cddab89c.tar.gz
Get closer to a working use-before-def check.
Diffstat (limited to 'mi/mi.h')
-rw-r--r--mi/mi.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/mi/mi.h b/mi/mi.h
index 9d7408f..5e52889 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -1,5 +1,6 @@
typedef struct Cfg Cfg;
typedef struct Bb Bb;
+typedef struct Reaching Reaching;
struct Cfg {
Node *fn;
@@ -27,8 +28,20 @@ struct Bb {
Bitset *succ;
};
+struct Reaching {
+ Bitset **in;
+ Bitset **out;
+ size_t **defs;
+ size_t *ndefs;
+};
+
/* expression folding */
Node *fold(Node *n, int foldvar);
+
+/* dataflow analysis */
+Reaching *reaching(Cfg *cfg);
+Node *assignee(Node *n);
+
/* Takes a reduced block, and returns a flow graph. */
Cfg *mkcfg(Node *fn, Node **nl, size_t nn);
void dumpcfg(Cfg *c, FILE *fd);