[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-227-g238ef4c
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-227-g238ef4c |
Date: |
Fri, 11 Oct 2013 12:16:16 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=238ef4cf4413e407d1d61e379b690310f7383605
The branch, master has been updated
via 238ef4cf4413e407d1d61e379b690310f7383605 (commit)
from 3aee6cfdd797be19dfc5f8ed8c6b7cfdd5c2695c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 238ef4cf4413e407d1d61e379b690310f7383605
Author: Andy Wingo <address@hidden>
Date: Fri Oct 11 14:10:19 2013 +0200
Replace conservatively-dominates? with a precise dominator lookup
* module/language/cps/dfg.scm (dominates?): Use the dominator tree
instead of the scope tree.
-----------------------------------------------------------------------
Summary of changes:
module/language/cps/dfg.scm | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/module/language/cps/dfg.scm b/module/language/cps/dfg.scm
index 667d822..fe5c245 100644
--- a/module/language/cps/dfg.scm
+++ b/module/language/cps/dfg.scm
@@ -486,15 +486,15 @@
uses))))))
;; Does k1 dominate k2?
-;;
-;; Note that this is a conservative predicate: a false return value does
-;; not indicate that k1 _doesn't_ dominate k2. The reason for this is
-;; that we are using the scope tree as an approximation of the dominator
-;; relationship. See
-;; http://mlton.org/pipermail/mlton/2003-January/023054.html for a
-;; deeper discussion.
-(define (conservatively-dominates? k1 k2 blocks)
- (continuation-scope-contains? k1 k2 blocks))
+(define (dominates? k1 k2 blocks)
+ (match (lookup-block k1 blocks)
+ (($ $block _ _ _ _ k1-idom k1-dom-level)
+ (match (lookup-block k2 blocks)
+ (($ $block _ _ _ _ k2-idom k2-dom-level)
+ (cond
+ ((> k1-dom-level k2-dom-level) #f)
+ ((< k1-dom-level k2-dom-level) (dominates? k1 k2-idom blocks))
+ ((= k1-dom-level k2-dom-level) (eqv? k1 k2))))))))
(define (dead-after-def? sym dfg)
(match dfg
@@ -512,7 +512,7 @@
;; are other ways for it to be dead, but this is an
;; approximation. A better check would be if the successor
;; post-dominates all uses.
- (and-map (cut conservatively-dominates? <> use-k blocks)
+ (and-map (cut dominates? <> use-k blocks)
uses))))))
;; A continuation is a "branch" if all of its predecessors are $kif
@@ -546,10 +546,10 @@
;; A symbol is dead after a branch if at least one of the
;; other branches dominates a use of the symbol, and all
;; other uses of the symbol dominate the test.
- (if (or-map (cut conservatively-dominates? <> use-k blocks)
+ (if (or-map (cut dominates? <> use-k blocks)
other-branches)
- (not (conservatively-dominates? branch use-k blocks))
- (conservatively-dominates? use-k branch blocks)))
+ (not (dominates? branch use-k blocks))
+ (dominates? use-k branch blocks)))
uses))))))
(define (lookup-bound-syms k dfg)
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. v2.1.0-227-g238ef4c,
Andy Wingo <=