diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-14 15:54:25 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | 67d3c2834d61026d5556cf9846f707844109cf33 (patch) | |
tree | 854a0846ccacfe2ba8ab39f9033757bba8e97960 /lisc/lisc.h | |
parent | 0f3846e261afd21be1f66bad151772349349583b (diff) | |
download | roux-67d3c2834d61026d5556cf9846f707844109cf33.tar.gz |
tentative support for fast allocs
It seems that the MEM reference type is meaningless in too many positions. Because of this, it is unclear if we should keep it or just introduce a OAddr instruction that only accepts slots. Regardless of the above, the spilling module needs to use the new slot_() function, also, the emit function needs to fetch the size of the stack frame from the slot[] array. The naming is still very transitional, here is a list of all bogus names I can think of: - SLOT() - Tmp.spill - slot_
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r-- | lisc/lisc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h index 3ae5c56..50c6504 100644 --- a/lisc/lisc.h +++ b/lisc/lisc.h @@ -90,6 +90,7 @@ struct Ref { enum { RTmp, RCon, + RMem, RSlot, NRef = (1<<14) - 1 }; @@ -98,6 +99,7 @@ enum { #define TMP(x) (Ref){RTmp, x} #define CON(x) (Ref){RCon, x} #define CON_Z CON(0) /* reserved zero constant */ +#define MEM(x) (Ref){RMem, x} #define SLOT(x) (Ref){RSlot, x} static inline int req(Ref a, Ref b) @@ -139,6 +141,7 @@ enum Op { OLoadub, OCopy, OAlloc, + OAlloc1 = OAlloc + 2, NPubOp, /* reserved instructions */ @@ -237,7 +240,7 @@ struct Fn { int ncon; int nblk; Blk **rpo; - uint nspill; + int slot[3]; }; @@ -262,6 +265,7 @@ void ssafix(Fn *, int); void filllive(Fn *); /* isel.c */ +int slot_(int, int, Fn *); void isel(Fn *); /* spill.c */ |