summaryrefslogtreecommitdiff
path: root/mi/mi.h
diff options
context:
space:
mode:
Diffstat (limited to 'mi/mi.h')
-rw-r--r--mi/mi.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/mi/mi.h b/mi/mi.h
index d9920e7..5e9441c 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -1,6 +1,7 @@
typedef struct Cfg Cfg;
typedef struct Bb Bb;
typedef struct Reaching Reaching;
+typedef struct Dtree Dtree;
struct Cfg {
Node *fn;
@@ -36,6 +37,27 @@ struct Reaching {
size_t nbb;
};
+struct Dtree {
+ int id;
+ Srcloc loc;
+
+ /* values for matching */
+ Node *lbl;
+ Node *load;
+ size_t nconstructors;
+ char accept;
+ char emitted;
+
+ /* the decision tree step */
+ Node **pat;
+ size_t npat;
+ Dtree **next;
+ size_t nnext;
+ Dtree *any;
+
+ size_t refcnt;
+};
+
/* dataflow analysis */
Reaching *reaching(Cfg *cfg);
void reachingfree(Reaching *r);