diff options
| author | 2023-06-13 12:02:28 +0200 | |
|---|---|---|
| committer | 2023-06-13 12:02:28 +0200 | |
| commit | de5aa052f234693698fa27564d12958df3fa433e (patch) | |
| tree | 837ed316bc13fe8063dde85e3b075c9357202297 /ir.h | |
| parent | 3e5c11563f8cb7c843c71a0f761e5b644f39db46 (diff) | |
use a hashtable for addr refs
Diffstat (limited to 'ir.h')
| -rw-r--r-- | ir.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -183,7 +183,7 @@ extern struct xcon conht[]; extern struct calltab {vec_of(struct call);} calltab; extern struct phitab {vec_of(struct phi);} phitab; extern struct dattab {vec_of(struct irdat);} dattab; -extern struct addrtab {vec_of(struct addr);} addrtab; +extern struct addr addrht[]; #define NOREF ((union ref) {0}) #define ZEROREF ((union ref) {{ RICON, 0 }}) #define mkref(t, x) ((union ref) {{ (t), (x) }}) @@ -203,6 +203,7 @@ struct instr mkalloca(uint siz, uint align); void conputdat(struct irdat *, uint off, enum typetag t, const void *dat); union ref mkcallarg(union irtype ret, uint narg, int vararg); #define mkintrin(B, C, N) mkinstr(Ointrin, C, {.t=RICON,B}, mkcallarg((union irtype){{0}},N,-1)) +union ref mkaddr(struct addr); union ref addinstr(struct function *, struct instr); union ref insertinstr(struct block *, int idx, struct instr); void delinstr(struct block *, int idx); |