This is an automated email from the git hooks/post-receive script. wingo pushed a commit to branch master in repository guile.
The following commit(s) were added to refs/heads/master by this push: new fc13923 Make CSE more robust fc13923 is described below commit fc139231a67d97aaa29509e61c8f616c6b7f23ac Author: Andy Wingo <wi...@pobox.com> AuthorDate: Fri Jun 12 15:58:54 2020 +0200 Make CSE more robust * module/language/cps/cse.scm (eliminate-common-subexpressions-in-fun): I think it's possible to get an orphan loop, with predecessors after successors in the original RPO. Handle that here. --- module/language/cps/cse.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/language/cps/cse.scm b/module/language/cps/cse.scm index 5fe89ce..3cc48cd 100644 --- a/module/language/cps/cse.scm +++ b/module/language/cps/cse.scm @@ -551,7 +551,11 @@ false. It could be that both true and false proofs are available." (prune-successors analysis label (term-successors term)))) ((trivial-intset preds) => (lambda (pred) - (match (intmap-ref out pred) + (match (and (< pred label) (intmap-ref out pred)) + (#f + ;; Orphan loop; branch folding must have removed + ;; entry. Could still be alive though. + (visit-term-normally)) (($ $kargs names' vars' ($ $continue _ _ ($ $values vals))) ;; Substitute dominating definitions, and try to elide the ;; predecessor entirely. @@ -583,7 +587,7 @@ false. It could be that both true and false proofs are available." ;; those as well. (add-auxiliary-definitions! pred vars substs term-key))) (visit-term-normally)) - (_ + ((or ($ $kclause) ($ $kreceive)) (visit-term-normally))))) (else (visit-term-normally)))))))