diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-11 14:53:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:01:20 -0700 |
| commit | 7f2bd1a27e9df408cbae57cf2aa9aa45383a7bb7 (patch) | |
| tree | 5074b20247dbc3ce9ed5296ddc42fc0a4ba872d6 /linearize.h | |
| parent | 3ffb6bac9871d6e2ed08ffbd61835561c48e9608 (diff) | |
| download | sparse-dev-7f2bd1a27e9df408cbae57cf2aa9aa45383a7bb7.tar.gz | |
This add a linearization phase. It's not even close to done
yet, but the framework is there.
When we linearize the tree we just generate a list of basic
blocks of statement expressions (and branches between them,
although that "small details" isn't actually done yet ;).
Diffstat (limited to 'linearize.h')
| -rw-r--r-- | linearize.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/linearize.h b/linearize.h new file mode 100644 index 00000000..22761dfc --- /dev/null +++ b/linearize.h @@ -0,0 +1,27 @@ +#ifndef LINEARIZE_H +#define LINEARIZE_H + +#include "lib.h" +#include "token.h" +#include "parse.h" +#include "symbol.h" + +struct basic_block_list; + +struct basic_block { + struct statement_list *stmts; +}; + +static inline void add_bb(struct basic_block_list **list, struct basic_block *bb) +{ + add_ptr_list((struct ptr_list **)list, bb); +} + +struct entrypoint { + struct symbol *name; + struct symbol_list *syms; + struct basic_block_list *bbs; +}; + +#endif /* LINEARIZE_H */ + |
