store the use locations for temporaries

This commit is contained in:
Quentin Carbonneaux 2015-11-13 13:12:22 -05:00
parent 681fc07def
commit 291c39565f
2 changed files with 54 additions and 7 deletions

View file

@ -14,6 +14,7 @@ typedef struct OpDesc OpDesc;
typedef struct Ins Ins;
typedef struct Phi Phi;
typedef struct Blk Blk;
typedef struct Use Use;
typedef struct Tmp Tmp;
typedef struct Con Con;
typedef struct Addr Mem;
@ -247,8 +248,23 @@ struct Blk {
char name[NString];
};
struct Use {
enum {
UXXX,
UPhi,
UIns,
UJmp,
} type;
int bid;
union {
int ins;
Ref phi;
} u;
};
struct Tmp {
char name[NString];
Use *use;
uint ndef, nuse;
uint cost;
short slot;