[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/25: Minor optimization in loop peeling
From: |
Andy Wingo |
Subject: |
[Guile-commits] 05/25: Minor optimization in loop peeling |
Date: |
Mon, 8 Jan 2018 09:25:02 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit 1bb44a1ad634c20046cd3de7fc41a1102be842a9
Author: Andy Wingo <address@hidden>
Date: Sun Jan 7 13:00:31 2018 +0100
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.
---
module/language/cps/peel-loops.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/language/cps/peel-loops.scm
b/module/language/cps/peel-loops.scm
index ec5cb5f..43e9869 100644
--- a/module/language/cps/peel-loops.scm
+++ b/module/language/cps/peel-loops.scm
@@ -126,13 +126,13 @@
(let ((live (compute-live-variables cps entry body succs)))
(intset-fold-right
cons
- (intmap-fold (lambda (label succs live-out)
- (if (intset-ref succs exit)
+ (intset-fold (lambda (label live-out)
+ (if (intset-ref (intmap-ref succs label) exit)
(if live-out
(intset-intersect live-out (intmap-ref live label))
(intmap-ref live label))
live-out))
- succs #f)
+ body #f)
'())))
(define (rename-cont cont fresh-labels fresh-vars)
- [Guile-commits] branch master updated (fa4cb21 -> e2a0624), Andy Wingo, 2018/01/08
- [Guile-commits] 05/25: Minor optimization in loop peeling,
Andy Wingo <=
- [Guile-commits] 03/25: Bug-fix to devirtualize-integers pass, Andy Wingo, 2018/01/08
- [Guile-commits] 07/25: Instruction explosion for make-vector, Andy Wingo, 2018/01/08
- [Guile-commits] 11/25: Remove "ash" instruction., Andy Wingo, 2018/01/08
- [Guile-commits] 09/25: Mark word-ref and word-ref/immediate as producing U64 values, Andy Wingo, 2018/01/08
- [Guile-commits] 12/25: Remove now-unused make-vector et al instructions, Andy Wingo, 2018/01/08
- [Guile-commits] 18/25: Minor compile-cps refactor for cons, Andy Wingo, 2018/01/08
- [Guile-commits] 15/25: CPS type analysis support for mutable vs immutable vectors, Andy Wingo, 2018/01/08
- [Guile-commits] 21/25: Remove pair-related instructions, Andy Wingo, 2018/01/08
- [Guile-commits] 10/25: CPS pass now expects exploded vector primitives, Andy Wingo, 2018/01/08
- [Guile-commits] 13/25: Add CPS compilation support for mutable-vector?, Andy Wingo, 2018/01/08