[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/12: Fix regression in compute-idoms
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/12: Fix regression in compute-idoms |
Date: |
Tue, 02 Jun 2015 08:33:48 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 75ab52e49048b5de95e41fed432f0e5528df0573
Author: Andy Wingo <address@hidden>
Date: Mon Jun 1 20:45:56 2015 +0200
Fix regression in compute-idoms
* module/language/cps2/utils.scm (compute-idoms): Adapt to previous
change that makes intmap-ref throw when the key is not present.
---
module/language/cps2/utils.scm | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/module/language/cps2/utils.scm b/module/language/cps2/utils.scm
index bf20c95..7905218 100644
--- a/module/language/cps2/utils.scm
+++ b/module/language/cps2/utils.scm
@@ -236,6 +236,8 @@
;; Kennedy's "A Simple, Fast Dominance Algorithm", 2001.
(let ((preds-map (compute-predecessors conts kfun)))
(define (compute-idom idoms preds)
+ (define (idom-ref label)
+ (intmap-ref idoms label (lambda (_) #f)))
(match preds
(() -1)
((pred) pred) ; Shortcut.
@@ -250,8 +252,8 @@
((not d0) d1)
((not d1) d0)
((= d0 d1) d0)
- ((< d0 d1) (lp d0 (intmap-ref idoms d1)))
- (else (lp (intmap-ref idoms d0) d1)))))
+ ((< d0 d1) (lp d0 (idom-ref d1)))
+ (else (lp (idom-ref d0) d1)))))
(fold1 common-idom preds pred))))
(define (adjoin-idom label preds idoms)
(let ((idom (compute-idom idoms preds)))
- [Guile-commits] branch master updated (48b2f19 -> 6e725df), Andy Wingo, 2015/06/02
- [Guile-commits] 01/12: Fix regression in compute-idoms,
Andy Wingo <=
- [Guile-commits] 03/12: Add intmap-replace., Andy Wingo, 2015/06/02
- [Guile-commits] 04/12: intset-next starting point is optional, Andy Wingo, 2015/06/02
- [Guile-commits] 02/12: Fix type-fold on multiplying exact numbers, Andy Wingo, 2015/06/02
- [Guile-commits] 06/12: DCE uses type analysis to find dead code, Andy Wingo, 2015/06/02
- [Guile-commits] 08/12: Fix compute-defining-expressions (and thereby compute-constant-values), Andy Wingo, 2015/06/02
- [Guile-commits] 07/12: Add intmap-replace!., Andy Wingo, 2015/06/02
- [Guile-commits] 09/12: Port prune-top-level-scopes pass to CPS2, Andy Wingo, 2015/06/02
- [Guile-commits] 10/12: Add intmap-fold-right, Andy Wingo, 2015/06/02
- [Guile-commits] 11/12: Add "intset" syntax to construct intsets., Andy Wingo, 2015/06/02
- [Guile-commits] 05/12: Port type inference module to CPS2, Andy Wingo, 2015/06/02