Commit 622b5df4 authored by Raymond Toy's avatar Raymond Toy
Browse files

Add some (runtime-enabled) debugging help for packing failures.

parent 40aa2475
...@@ -340,6 +340,8 @@ ...@@ -340,6 +340,8 @@
VM definition inconsistent, try recompiling."))))) VM definition inconsistent, try recompiling.")))))
(defvar *debug-pack* nil)
;;; FAILED-TO-PACK-ERROR -- Internal ;;; FAILED-TO-PACK-ERROR -- Internal
;;; ;;;
;;; Called when we failed to pack TN. If Restricted is true, then we we ;;; Called when we failed to pack TN. If Restricted is true, then we we
...@@ -351,8 +353,12 @@ ...@@ -351,8 +353,12 @@
(scs (cons sc (sc-alternate-scs sc)))) (scs (cons sc (sc-alternate-scs sc))))
(cond (cond
(restricted (restricted
(error "Failed to pack restricted TN ~S in its SC ~S." (when *debug-pack*
tn (sc-name sc))) ;; Useful for possibly figuring out which vop might be the
;; source of the conflict.
(describe tn))
(error "Failed to pack restricted TN ~S in its SC ~S: ~S"
tn (sc-name sc) (tn-sc tn)))
(t (t
(assert (not (find :unbounded scs (assert (not (find :unbounded scs
:key #'(lambda (x) (sb-kind (sc-sb x)))))) :key #'(lambda (x) (sb-kind (sc-sb x))))))
...@@ -1511,7 +1517,8 @@ ...@@ -1511,7 +1517,8 @@
(when (and save (when (and save
(eq (tn-kind save) :specified-save)) (eq (tn-kind save) :specified-save))
(tn-sc save)))) (tn-sc save))))
(when *debug-pack*
(format t "pack-tn alternates: ~S~%" alternates))
(do ((sc fsc (pop alternates))) (do ((sc fsc (pop alternates)))
((null sc) ((null sc)
(failed-to-pack-error tn restricted)) (failed-to-pack-error tn restricted))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment