(cse/assign) Notice pops from stack and adjust stack pointer
authorChris Hanson <org/chris-hanson/cph>
Fri, 3 Jun 1988 23:54:57 +0000 (23:54 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 3 Jun 1988 23:54:57 +0000 (23:54 +0000)
accordingly.  Can't understand why this wasn't noticed before.

v7/src/compiler/rtlopt/rcse1.scm

index 43d6949f5d18cdf709a03222216afe18402a6bdf..ca9ecf9b70faac187985616fefa7936252eb1f48 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 4.8 1988/06/03 14:54:29 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 4.9 1988/06/03 23:54:57 cph Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -212,11 +212,14 @@ MIT in each case. |#
                                                        hash
                                                        insert-source!
                                                        memory-invalidate!)))))
-                ;; **** Kludge.  Works only because stack-pointer
-                ;; gets used in very fixed way by code generator.
-                (if (stack-push/pop? address)
-                    (stack-pointer-adjust!
-                     (rtl:address-number address))))))))))
+                (notice-push/pop! address)))))
+      (notice-push/pop! (rtl:assign-expression statement)))))
+
+(define (notice-push/pop! expression)
+  ;; **** Kludge.  Works only because stack-pointer
+  ;; gets used in very fixed way by code generator.
+  (if (stack-push/pop? expression)
+      (stack-pointer-adjust! (rtl:address-number expression))))
 
 (define (assignment-memory-insertion address hash insert-source!
                                     memory-invalidate!)