diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-01 10:06:58 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-01 10:06:58 -0400 |
commit | 6a2c88054318290f4b4aeb6f24d710a3f99c6415 (patch) | |
tree | 0a4394c43ca4f0f3dee0dd5bace155871c6e7470 /live.c | |
parent | bb0dc28eb8453e35fbfcd1e6ef73b0e6886ea401 (diff) | |
download | roux-6a2c88054318290f4b4aeb6f24d710a3f99c6415.tar.gz |
use bsiter in critical loop
Diffstat (limited to 'live.c')
-rw-r--r-- | live.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/live.c b/live.c index 44806e1..c61e987 100644 --- a/live.c +++ b/live.c @@ -70,7 +70,8 @@ filllive(Fn *f) { Blk *b; Ins *i; - int k, t, m[2], n, chg, nlv[2]; + int k, m[2], n, chg, nlv[2]; + uint t; short *phi; BSet u[1], v[1]; Mem *ma; @@ -102,11 +103,10 @@ Again: memset(phi, 0, f->ntmp * sizeof phi[0]); memset(nlv, 0, sizeof nlv); bscopy(b->in, b->out); - for (t=0; t<f->ntmp; t++) - if (bshas(b->in, t)) { - phifix(t, phi, f->tmp); - nlv[KBASE(f->tmp[t].cls)]++; - } + for (t=0; bsiter(b->in, &t); t++) { + phifix(t, phi, f->tmp); + nlv[KBASE(f->tmp[t].cls)]++; + } if (rtype(b->jmp.arg) == RACall) { assert(bscount(b->in) == 0 && nlv[0] == 0 && nlv[1] == 0); b->in->t[0] |= retregs(b->jmp.arg, nlv); |