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

Inhibit loop rotation when the loop head is also the head of the current

function, as various people (like the debugger) assume that functions start at
the beginning.
parent 62a99588
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/control.lisp,v 1.8 1991/11/09 22:04:48 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/control.lisp,v 1.9 1991/11/11 22:07:32 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -55,7 +55,9 @@ ...@@ -55,7 +55,9 @@
;;; ;;;
;;; This optimization is inhibited in functions with NLX EPs, since it is hard ;;; This optimization is inhibited in functions with NLX EPs, since it is hard
;;; to do this without possibly messing up the special-case walking from NLX ;;; to do this without possibly messing up the special-case walking from NLX
;;; EPs described in CONTROL-ANALYZE-1-FUN. ;;; EPs described in CONTROL-ANALYZE-1-FUN. We also suppress rotation of loop
;;; heads which are the start of a function (i.e. tail calls), as the debugger
;;; wants functions to start at the start.
;;; ;;;
(defun find-rotated-loop-head (block) (defun find-rotated-loop-head (block)
(declare (type cblock block)) (declare (type cblock block))
...@@ -67,7 +69,10 @@ ...@@ -67,7 +69,10 @@
(< (block-number pred) num)) (< (block-number pred) num))
(return pred))))) (return pred)))))
(cond (cond
((and pred (not (environment-nlx-info env))) ((and pred
(not (environment-nlx-info env))
(not (eq (node-block (lambda-bind (block-home-lambda block)))
block)))
(let ((current pred) (let ((current pred)
(current-num (block-number pred))) (current-num (block-number pred)))
(block DONE (block DONE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment