diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-07-20 17:53:58 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:28 -0400 |
commit | 73add5daaef5f6b764ac2ddf260b27f86d12e1af (patch) | |
tree | 6a6e085c9799f0c4c97ceb6260d8f0c85f34d641 /lisc/lisc.h | |
parent | 32cb8d315afae78dfe35ce57512b7015a0cb0fb4 (diff) | |
download | roux-73add5daaef5f6b764ac2ddf260b27f86d12e1af.tar.gz |
start work on spiller
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r-- | lisc/lisc.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h index c907d06..84022a0 100644 --- a/lisc/lisc.h +++ b/lisc/lisc.h @@ -32,11 +32,11 @@ enum { R13, R14, R15, + NReg = R15 - RAX + 1 }; enum { - NReg = 32, - Tmp0 = NReg+1, + Tmp0 = 33, NString = 32, NPred = 15, @@ -44,11 +44,11 @@ enum { NIns = 256, BITS = 4, - NBit = 8 * sizeof(unsigned long long), + NBit = 8 * sizeof(uint64_t), }; struct Bits { - unsigned long long t[BITS]; + uint64_t t[BITS]; }; #define BGET(b, n) (1&((b).t[n/NBit]>>(n%NBit))) @@ -131,6 +131,7 @@ struct Blk { Blk **pred; uint npred; Bits in, out; + int loop; char name[NString]; int id; }; @@ -143,6 +144,7 @@ struct Sym { } type; char name[NString]; uint ndef, nuse; + int cost; }; struct Fn { @@ -168,3 +170,10 @@ void ssafix(Fn *, int); /* live.c */ void filllive(Fn *); + +/* isel.c */ +void isel(Fn *); + +/* spill.c */ +void fillcost(Fn *); +void spill(Fn *); |