diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-26 16:33:29 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-26 16:33:29 -0400 |
commit | aa9dc343995ef2eafcb3ef630e2ab8e3ec61ac4f (patch) | |
tree | 846867688d43bd926e7bc74dfcc88726a743486c /lisc/spill.c | |
parent | e80b84ebdb6c0623442a26ac10fc763cc6d9e6e9 (diff) | |
download | roux-aa9dc343995ef2eafcb3ef630e2ab8e3ec61ac4f.tar.gz |
move the liveon() function in live.c
Diffstat (limited to 'lisc/spill.c')
-rw-r--r-- | lisc/spill.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lisc/spill.c b/lisc/spill.c index 115b6fc..36b08cd 100644 --- a/lisc/spill.c +++ b/lisc/spill.c @@ -258,22 +258,6 @@ setloc(Ref *pr, Bits *v, Bits *w) } } -static Bits -inregs(Blk *b, Blk *s) /* todo, move to live.c */ -{ - Bits v; - Phi *p; - uint a; - - v = s->in; - for (p=s->phi; p; p=p->link) - for (a=0; a<p->narg; a++) - if (p->blk[a] == b) - if (rtype(p->arg[a]) == RTmp) - BSET(v, p->arg[a].val); - return v; -} - static Ins * dopm(Blk *b, Ins *i, Bits *v) { @@ -374,10 +358,10 @@ spill(Fn *fn) } else if (j > NReg) limit(&v, NReg, 0); } else if (s1) { - v = inregs(b, s1); + v = liveon(b, s1); w = v; if (s2) { - u = inregs(b, s2); + u = liveon(b, s2); for (z=0; z<BITS; z++) { v.t[z] |= u.t[z]; w.t[z] &= u.t[z]; |