Make multiply-fixnum do inline case more often. Previously we were
authorJason Wilson <edu/mit/csail/zurich/jawilson>
Fri, 6 Aug 1993 05:44:41 +0000 (05:44 +0000)
committerJason Wilson <edu/mit/csail/zurich/jawilson>
Fri, 6 Aug 1993 05:44:41 +0000 (05:44 +0000)
being screwed by the CSE.

v7/src/compiler/machines/spectrum/rulrew.scm

index 5ea2c3f6a16da10af501fd1c58ae86290fbfa1cb..97deaccfe84bf4c1df958d7b33c24dd14519b9db 100644 (file)
@@ -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)