From c7a9bb02694ec8116c972820af1fb12ec5f7b995 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Thu, 24 Sep 1992 16:41:49 +0000 Subject: [PATCH] Added a hack to IF-IF optimization to hopefully prevent some spurious unreachable code notes. --- compiler/ir1opt.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler/ir1opt.lisp b/compiler/ir1opt.lisp index 41f9daeea..f130457fc 100644 --- a/compiler/ir1opt.lisp +++ b/compiler/ir1opt.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.54 1992/09/23 13:45:24 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.55 1992/09/24 16:41:49 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -634,6 +634,11 @@ ;;; (IF (IF A B C) D E) ==> ;;; (IF A (IF B D E) (IF C D E)) ;;; +;;; We clobber the NODE-SOURCE-PATH of both the original and the new node so +;;; that dead code deletion notes will definitely not consider either node to +;;; be part of the original source. One node might become unreachable, +;;; resulting in a spurious note. +;;; (defun convert-if-if (use node) (declare (type node use) (type cif node)) (with-ir1-environment node @@ -660,6 +665,9 @@ (link-blocks new-block cblock) (link-blocks new-block ablock) + (push "<IF Duplication>" (node-source-path node)) + (push "<IF Duplication>" (node-source-path new-node)) + (reoptimize-continuation test) (reoptimize-continuation new-cont) (setf (component-reanalyze *current-component*) t))) -- GitLab