diff options
author | Teddy <ted.sybil@gmail.com> | 2014-04-29 23:42:01 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2014-04-29 23:42:01 +0800 |
commit | 042d8cf2f62b92abc8b14ab88a09c875a265d585 (patch) | |
tree | 4a0c4487a39a6350d615542b449345b1c05b043a /ssa.h | |
parent | c5686107b96e8d796029c9cf4536021066b4001e (diff) |
renaming now works
Diffstat (limited to 'ssa.h')
-rw-r--r-- | ssa.h | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -2,6 +2,10 @@ #define SSA_H #include "const.h" #include "semantics.h" + +typedef struct CInst CInst; +typedef CInst *CInst_t; + typedef struct COpr COpr; typedef COpr *COpr_t; struct COpr { @@ -16,10 +20,17 @@ struct COpr { int imm; char *str; } info; + int sub; + CInst_t def; +}; + +typedef struct COList COList; +typedef COList *COList_t; +struct COList { + COpr_t opr; + COList_t next; }; -typedef struct CInst CInst; -typedef CInst *CInst_t; struct CInst { enum { BEQZ, /* conditional jump */ @@ -56,6 +67,7 @@ struct CBlock { CBlock_t next, prev; int id; int ref; /* if referenced by any gotos */ + int pred; /* the number of predecessors */ }; typedef struct CBList CBList; @@ -65,6 +77,13 @@ struct CBList { CBList_t next; }; +typedef struct CVList CVList; +typedef CVList *CVList_t; +struct CVList { + CVar_t var; + CVList_t next; +}; + CBlock_t cblock_create(int inc); void cblock_append(CBlock_t cblk, CInst_t inst); void cblock_pappend(CBlock_t cblk, CPhi_t phi); |