From a0639bb329c7b39520ea0a6f89dfebd494eabc2b Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Sun, 14 Feb 1993 06:26:55 +0000 Subject: [PATCH] Do not move conditionals around conditionals. --- v7/src/compiler/machines/spectrum/lapopt.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/v7/src/compiler/machines/spectrum/lapopt.scm b/v7/src/compiler/machines/spectrum/lapopt.scm index bd26e2fb1..b49c58e87 100644 --- a/v7/src/compiler/machines/spectrum/lapopt.scm +++ b/v7/src/compiler/machines/spectrum/lapopt.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: lapopt.scm,v 1.2 1993/02/14 04:23:48 gjr Exp $ +$Id: lapopt.scm,v 1.3 1993/02/14 06:26:55 gjr Exp $ Copyright (c) 1991-1993 Massachusetts Institute of Technology @@ -123,10 +123,17 @@ MIT in each case. |# ((memq opcode '(COMB ...)) <>) |# - ((memq opcode '(LABEL EQUATE)) + ((memq opcode '(LABEL EQUATE ENTRY-POINT + EXTERNAL-LABEL BLOCK-OFFSET)) (values 'DIRECTIVE false false false)) (else (values 'UNKNOWN false false false))))) + +(define (instruction-type instr) + (with-values (lambda () (classify-instruction instr)) + (lambda (type tgt src1 src2) + tgt src1 src2 ; ignored + type))) ;;;; Utilities @@ -287,9 +294,7 @@ MIT in each case. |# (let* ((next (find-or-label (cdr instrs))) (next* (and next (find-non-label (cdr next))))) (if (and next - (not (memq (caar next) - '(LABEL ENTRY-POINT - EXTERNAL-LABEL BLOCK-OFFSET))) + (memq (instruction-type (car next) '(MEMORY ALU))) (not (skips? (car next))) (or (not next*) (not (skips? (car next*))))) -- 2.25.1