diff options
| author | 2023-06-20 19:11:15 +0200 | |
|---|---|---|
| committer | 2023-06-20 19:11:15 +0200 | |
| commit | 8cea6c2e91641b06921b4e358c73c60981ba366d (patch) | |
| tree | 060198058427b9272f2167abd5b36580cd917ef7 /ir.h | |
| parent | 3abdb713474bd282b9ce322abf7ec3609af2eb12 (diff) | |
add basic mem2reg
promotes uniform stack slots to temporaries
currently only for immutable variables, next thing to implement is ssa
construction
Diffstat (limited to 'ir.h')
| -rw-r--r-- | ir.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -113,6 +113,12 @@ struct instr { union ref l, r; }; +struct use { bool isjmp; union { ushort ins, blk; }; }; +struct uses { + int nuse; + struct use *use, _use0[2]; +}; + enum jumpkind { JXXX, Jb, Jret, }; @@ -235,9 +241,13 @@ void replref(struct function *, struct block *, int, union ref from, union ref t void irdump(struct function *); -void lowerintrin(struct function *); +struct uses *ssauses(struct function *); +void freeuses(struct uses *, int n); + void abi0(struct function *); void abi0_call(struct function *, struct instr *, struct block *blk, int *curi); +void mem2reg(struct function *); +void lowerintrin(struct function *); void regalloc(struct function *); /* vim:set ts=3 sw=3 expandtab: */ |