From 51f54cb708de2f56172e2d8c567a35a02b681274 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 4 Apr 2016 16:35:04 +0300 Subject: [PATCH] Work around a constraint propagation problem. Clear the results of previous runs in CONSTRAINT-PROPAGATE. Otherwise FIND-AND-PROPAGATE-CONSTRAINTS may never terminate since it'll think that things keep changing. Fixes lp#1540123 --- src/compiler/constraint.lisp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index d8790d55f..32f18fa5e 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -1030,7 +1030,6 @@ (block-in block) (copy-conset (block-in block))) final-pass-p))) - (setf (block-gen block) gen) (multiple-value-bind (consequent-constraints alternative-constraints) (constraint-propagate-if block gen) (if consequent-constraints @@ -1206,10 +1205,10 @@ (defun constraint-propagate (component) (declare (type component component)) (init-var-constraints component) - - (unless (block-out (component-head component)) - (setf (block-out (component-head component)) (make-conset))) - + ;; Previous results can confuse propagation and may loop forever + (do-blocks (block component) + (setf (block-out block) nil)) + (setf (block-out (component-head component)) (make-conset)) (dolist (block (find-and-propagate-constraints component)) (unless (block-delete-p block) (use-result-constraints block))) -- 2.11.4.GIT