mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
Minor optimization in loop peeling
* module/language/cps/peel-loops.scm (compute-out-vars): Fold over the body of the loop, not the body of the function. A small optimization.
This commit is contained in:
parent
ef23e512b5
commit
1bb44a1ad6
1 changed files with 3 additions and 3 deletions
|
@ -126,13 +126,13 @@
|
||||||
(let ((live (compute-live-variables cps entry body succs)))
|
(let ((live (compute-live-variables cps entry body succs)))
|
||||||
(intset-fold-right
|
(intset-fold-right
|
||||||
cons
|
cons
|
||||||
(intmap-fold (lambda (label succs live-out)
|
(intset-fold (lambda (label live-out)
|
||||||
(if (intset-ref succs exit)
|
(if (intset-ref (intmap-ref succs label) exit)
|
||||||
(if live-out
|
(if live-out
|
||||||
(intset-intersect live-out (intmap-ref live label))
|
(intset-intersect live-out (intmap-ref live label))
|
||||||
(intmap-ref live label))
|
(intmap-ref live label))
|
||||||
live-out))
|
live-out))
|
||||||
succs #f)
|
body #f)
|
||||||
'())))
|
'())))
|
||||||
|
|
||||||
(define (rename-cont cont fresh-labels fresh-vars)
|
(define (rename-cont cont fresh-labels fresh-vars)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue