Fix dependencies
[smatch.git] / linearize.h
blob7fc2b0d1833957d5ccad152f4e7622d487e31116
1 #ifndef LINEARIZE_H
2 #define LINEARIZE_H
4 #include "lib.h"
5 #include "token.h"
6 #include "parse.h"
7 #include "symbol.h"
9 struct basic_block_list;
12 * Basic block flags. Right now we only have one, which keeps
13 * track (at build time) whether the basic block has been branched
14 * out of yet.
16 #define BB_HASBRANCH 0x00000001
18 struct basic_block {
19 unsigned long flags; /* BB status flags */
20 struct symbol *this; /* Points to the symbol that owns "this" basic block - NULL if unreachable */
21 struct statement_list *stmts; /* Linear list of statements */
22 struct symbol *next; /* Points to the symbol that describes the fallthrough */
25 static inline void add_bb(struct basic_block_list **list, struct basic_block *bb)
27 add_ptr_list((struct ptr_list **)list, bb);
30 struct entrypoint {
31 struct symbol *name;
32 struct symbol_list *syms;
33 struct basic_block_list *bbs;
34 struct basic_block *active;
37 void linearize_symbol(struct symbol *sym);
39 #endif /* LINEARIZE_H */