0.8.16.16:
[sbcl.git] / src / compiler / dfo.lisp
index 18dcaec..51a5953 100644 (file)
     (do-blocks-backwards (block component :both)
       (if (block-flag block)
          (setf (block-number block) (incf num))
-         (setf (block-delete-p block) t)))
-    (do-blocks (block component)
-      (when (block-delete-p block)
-       (delete-block block))))
+         (delete-block-lazily block)))
+    (clean-component component (component-head component)))
   (values))
 
 ;;; Move all the code and entry points from OLD to NEW. The code in
     (setf (block-flag block) t)
     (dolist (succ (block-succ block))
       (find-dfo-aux succ head component))
+    (when (component-nlx-info-generated-p component)
+      ;; FIXME: We also need (and do) this walk before physenv
+      ;; analysis, but at that time we are probably not very
+      ;; interested in the actual DF order.
+      ;;
+      ;; TODO: It is probable that one of successors have the same (or
+      ;; similar) set of NLXes; try to shorten the walk (but think
+      ;; about a loop, the only exit from which is non-local).
+      (map-block-nlxes (lambda (nlx-info)
+                         (let ((nle (nlx-info-target nlx-info)))
+                         (find-dfo-aux nle head component)))
+                       block))
     (remove-from-dfo block)
     (add-to-dfo block head))
   (values))
     (the simple-string
       (if (stringp leaf-debug-name)
          leaf-debug-name
-         (debug-namify "function ~S" leaf-debug-name)))))
+         (debug-namify "function " leaf-debug-name)))))
 
 ;;; Given a list of top level lambdas, return
 ;;;   (VALUES NONTOP-COMPONENTS TOP-COMPONENTS HAIRY-TOP-COMPONENTS).