From 3902def01ff17eee5914d4fb98ba8f8912eafde3 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 31 Dec 1987 05:49:33 +0000 Subject: [PATCH] Must invalidate memory for all assignments. Was losing in case where destination of assignment was non-volatile and source was volatile. --- v7/src/compiler/rtlopt/rcse1.scm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/v7/src/compiler/rtlopt/rcse1.scm b/v7/src/compiler/rtlopt/rcse1.scm index 6378ba243..3190a773f 100644 --- a/v7/src/compiler/rtlopt/rcse1.scm +++ b/v7/src/compiler/rtlopt/rcse1.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 4.2 1987/12/30 07:13:08 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 4.3 1987/12/31 05:49:33 cph Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -193,18 +193,18 @@ MIT in each case. |# (hash-table-lookup hash address)) (hash-table-delete-class! element-address-varies?)))))) - (cond (volatile?* (memory-invalidate!)) - ((not volatile?) - (let ((address - (find-cheapest-expression address hash - false))) - (let ((element (insert-source!))) - (memory-invalidate!) - (insert-memory-destination! - address - element - (modulo (+ (symbol-hash 'ASSIGN) hash) - (hash-table-size)))))))))) + (if (or volatile? volatile?*) + (memory-invalidate!) + (let ((address + (find-cheapest-expression address hash + false))) + (let ((element (insert-source!))) + (memory-invalidate!) + (insert-memory-destination! + address + element + (modulo (+ (symbol-hash 'ASSIGN) hash) + (hash-table-size))))))))) ;; **** Kludge. Works only because stack-pointer ;; gets used in very fixed way by code generator. (if (stack-push/pop? address) -- 2.25.1