From: Jason Wilson Date: Fri, 6 Aug 1993 05:44:41 +0000 (+0000) Subject: Make multiply-fixnum do inline case more often. Previously we were X-Git-Tag: 20090517-FFI~8122 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a9e99029856a528351cddfe627d7f0aea5a9d1fb;p=mit-scheme.git Make multiply-fixnum do inline case more often. Previously we were being screwed by the CSE. --- diff --git a/v7/src/compiler/machines/spectrum/rulrew.scm b/v7/src/compiler/machines/spectrum/rulrew.scm index 5ea2c3f6a..97deaccfe 100644 --- a/v7/src/compiler/machines/spectrum/rulrew.scm +++ b/v7/src/compiler/machines/spectrum/rulrew.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: rulrew.scm,v 1.11 1993/07/07 19:21:26 gjr Exp $ +$Id: rulrew.scm,v 1.12 1993/08/06 05:44:41 jawilson Exp $ Copyright (c) 1990-1993 Massachusetts Institute of Technology @@ -143,12 +143,7 @@ MIT in each case. |# (? operand-2) #F) (QUALIFIER (and (rtl:register? operand-2) - (rtl:constant-fixnum-test - operand-1 - (lambda (n) - (let ((absn (abs n))) - (and (integer-log-base-2? absn) - (<= absn 64))))))) + (rtl:constant-fixnum-test operand-1 spectrum-inline-multiply?))) (rtl:make-fixnum-2-args 'MULTIPLY-FIXNUM operand-1 operand-2 #F)) (define-rule rewriting @@ -157,14 +152,18 @@ MIT in each case. |# (REGISTER (? operand-2 register-known-value)) #F) (QUALIFIER (and (rtl:register? operand-1) - (rtl:constant-fixnum-test - operand-2 - (lambda (n) - (let ((absn (abs n))) - (and (integer-log-base-2? absn) - (<= absn 64))))))) + (rtl:constant-fixnum-test operand-2 spectrum-inline-multiply?))) (rtl:make-fixnum-2-args 'MULTIPLY-FIXNUM operand-1 operand-2 #F)) +(define (spectrum-inline-multiply? n) + #| + (let ((absn (abs n))) + (and (integer-log-base-2? absn) + (<= absn 64))) + |# + n ; fnord + true) + (define-rule rewriting (FIXNUM-2-ARGS FIXNUM-QUOTIENT (? operand-1)