Used Variables instead of Options, in SConstruct
[mcc.git] / icode.h
blob5a897cba9df415e5bb7d1f71cdabe99494bb55b6
1 #ifndef MCC_ICODE_H
2 #define MCC_ICODE_H
4 #include "stree.h"
6 typedef enum {
7 IC_NOP = 0,
8 IC_ADD,
9 IC_SUB,
10 IC_MUL,
11 // WARNING: add entries to icop_strs when adding entries here
12 } icopn_t;
14 struct icop {
15 struct icop *prev, *next;
16 int id; // debugging id
17 icopn_t op;
18 struct icop *operands[2];
21 struct icblock {
22 int id; // debugging id
23 struct icop *o_first, *o_last;
24 struct icop *condition; // condition for flow to next[0] or next[1]
25 struct icblock *exit[2]; // next blocks in flow (0=condition is false, 1=condition is true)
28 void icblock_create(struct icblock *bl);
29 void icblock_destroy(struct icblock *bl);
30 void icblock_dump(struct icblock *bl);
31 struct icop *icblock_append(struct icblock *bl);
33 #endif