Skip to content
Snippets Groups Projects
Commit 5d460438 authored by ram's avatar ram
Browse files

Oops... We weren't dropping results from the live set, causing "saving" code

be emitted after each call (trashing the results).  Changed COMPUTE-SAVE-SET to
compute the correct bit-vector.  Changed :FORCE-TO-STACK code to use this
results with DO-LIVE-TNS, now that the list result isn't available.
parent 7358dd8a
No related branches found
No related tags found
No related merge requests found
...@@ -548,21 +548,16 @@ ...@@ -548,21 +548,16 @@
;;; Compute-Save-Set -- Internal ;;; Compute-Save-Set -- Internal
;;; ;;;
;;; Compute a list of the TNs live after VOP that aren't results. ;;; Compute a bit vector of the TNs live after VOP that aren't results.
;;; ;;;
(defun compute-save-set (vop block live-list) (defun compute-save-set (vop block live-bits)
(declare (type vop vop) (type ir2-block block) (type (or tn null) live-list)) (declare (type vop vop) (type ir2-block block)
(collect ((save)) (type local-tn-bit-vector live-list))
(let ((results (vop-results vop))) (let ((live (bit-vector-copy live-bits)))
(do ((live live-list (tn-next* live))) (do ((r (vop-results vop) (tn-ref-across r)))
((null live)) ((null r))
(unless (find-in #'tn-ref-across live results :key #'tn-ref-tn) (setf (sbit live (tn-local-number (tn-ref-tn r))) 0))
(save live)))) live))
(do ((conf (ir2-block-global-tns block) (global-conflicts-next conf)))
((null conf))
(when (eq (global-conflicts-kind conf) :live)
(save (global-conflicts-tn conf))))
(save)))
;;; Compute-Initial-Conflicts -- Internal ;;; Compute-Initial-Conflicts -- Internal
...@@ -642,11 +637,12 @@ ...@@ -642,11 +637,12 @@
(let ((save-p (vop-info-save-p (vop-info vop)))) (let ((save-p (vop-info-save-p (vop-info vop))))
(when save-p (when save-p
(setf (vop-save-set vop) (bit-vector-copy live-bits)) (let ((ss (compute-save-set vop block live-bits)))
(when (eq save-p :force-to-stack) (setf (vop-save-set vop) ss)
(dolist (tn (compute-save-set vop block live-list)) (when (eq save-p :force-to-stack)
(force-tn-to-stack tn) (do-live-tns (tn ss block)
(convert-to-environment-tn tn))))) (force-tn-to-stack tn)
(convert-to-environment-tn tn))))))
(do ((ref (vop-refs vop) (tn-ref-next-ref ref))) (do ((ref (vop-refs vop) (tn-ref-next-ref ref)))
((null ref)) ((null ref))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment