From ca288539ee3b5e8e19344373938bc9908871e430 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Tue, 24 Feb 1998 09:58:18 +0000
Subject: [PATCH] When constant-folding succeeds alway transform the call so
 that even non-flushable functions are flushed.  For single value calls it had
 been just unlinking the result and inserting the constant but this failed to
 flush the call if it didn't have a flushable attribute, for example numeric
 constant coercions were not being flush when successful leading to rather
 inefficient code.

---
 compiler/ir1opt.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/ir1opt.lisp b/compiler/ir1opt.lisp
index 9f2f75608..6ea6145ee 100644
--- a/compiler/ir1opt.lisp
+++ b/compiler/ir1opt.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.65 1994/10/31 04:27:28 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.66 1998/02/24 09:58:18 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1112,6 +1112,9 @@
       (cond
        ((not win)
 	(setf (combination-kind call) :error))
+       ;; X Always transform the call below so that non-flushable
+       ;; functions get flushed if the constant folding works.
+       #+nil
        ((= (length values) 1)
 	(with-ir1-environment call
 	  (when (producing-fasl-file)
-- 
GitLab