[movitz-cvs] CVS update: movitz/compiler.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Mon Nov 15 23:08:58 UTC 2004


Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv19254

Modified Files:
	compiler.lisp 
Log Message:
Disable optimize-code-dirties, because the optimization it performed
wasn't safe.

Date: Tue Nov 16 00:08:57 2004
Author: ffjeld

Index: movitz/compiler.lisp
diff -u movitz/compiler.lisp:1.105 movitz/compiler.lisp:1.106
--- movitz/compiler.lisp:1.105	Sat Nov 13 17:13:01 2004
+++ movitz/compiler.lisp	Tue Nov 16 00:08:57 2004
@@ -8,7 +8,7 @@
 ;;;; Created at:    Wed Oct 25 12:30:49 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: compiler.lisp,v 1.105 2004/11/13 16:13:01 ffjeld Exp $
+;;;; $Id: compiler.lisp,v 1.106 2004/11/15 23:08:57 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -1457,7 +1457,9 @@
   "These optimizations may rearrange register usage in a way that is incompatible
 with other optimizations that track register usage. So this is performed just once,
 initially."
-  (labels
+  unoptimized-code
+  #+ignore
+  (labels				; This stuff doesn't work..
       ((explain (always format &rest args)
 	 (when (or always *explain-peephole-optimizations*)
 	   (warn "Peephole: ~?~&----------------------------" format args)))
@@ -1488,16 +1490,15 @@
 	as i1 = (first pc)		; current instruction, collected by default.
 	and i2 = (second pc) and i3 = (third pc)
 	while pc
- 	do (cond
-	    ((let ((regx (register-operand (twop-src i1 :movl)))
-		   (regy (register-operand (twop-dst i1 :movl))))
-	       (and regx regy
-		    (eq regx (twop-dst i2 :movl))
-		    (eq regx (twop-src i3 :cmpl))
-		    (eq regy (twop-dst i3 :cmpl))))
-	     (setq p (list `(:cmpl ,(twop-src i2) ,(twop-src i1)))
-		   next-pc (nthcdr 3 pc))
-	     (explain nil "4: ~S for ~S" p (subseq pc 0 4))))
+ 	do (let ((regx (register-operand (twop-src i1 :movl)))
+		 (regy (register-operand (twop-dst i1 :movl))))
+	     (when (and regx regy
+			(eq regx (twop-dst i2 :movl))
+			(eq regx (twop-src i3 :cmpl))
+			(eq regy (twop-dst i3 :cmpl)))
+	       (setq p (list `(:cmpl ,(twop-src i2) ,regx) i1)
+		     next-pc (nthcdr 3 pc))
+	       (explain t "4: ~S for ~S [regx ~S, regy ~S]" p (subseq pc 0 5) regx regy)))
 	nconc p)))
 
 (defun optimize-code-internal (unoptimized-code recursive-count &rest key-args





More information about the Movitz-cvs mailing list