diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-05 15:15:10 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-05 15:15:19 -0400 |
commit | 865964706f9c3f4f564849589b8cc1bada970569 (patch) | |
tree | 04868c9923fede969db03e1da62ddb09660eb4ec /rega.c | |
parent | f6bd53d2adfcd6e0abcbb2070759ca0241d5d7b7 (diff) | |
download | roux-865964706f9c3f4f564849589b8cc1bada970569.tar.gz |
use bsiter() for better performance
Diffstat (limited to 'rega.c')
-rw-r--r-- | rega.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rega.c b/rega.c index 927e5aa..3b3c215 100644 --- a/rega.c +++ b/rega.c @@ -556,12 +556,11 @@ rega(Fn *fn) src = rref(&end[b->id], src.val); pmadd(src, dst, p->cls); } - for (t=Tmp0; t<fn->ntmp; t++) - if (bshas(s->in, t)) { - src = rref(&end[b->id], t); - dst = rref(&beg[s->id], t); - pmadd(src, dst, tmp[t].cls); - } + for (t=Tmp0; bsiter(s->in, &t); t++) { + src = rref(&end[b->id], t); + dst = rref(&beg[s->id], t); + pmadd(src, dst, tmp[t].cls); + } pmgen(); if (curi == insb) continue; |