From 65ec17ef58af29228056fc2bd83523c4f83640a4 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 28 Nov 2018 08:51:28 +0000 Subject: [PATCH] Delete a rewriting rule that could not possibly have ever matched. It would have required (object->float (object->float ...)) to appear in the input, which makes no sense. --- src/compiler/machines/x86-64/rulrew.scm | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/compiler/machines/x86-64/rulrew.scm b/src/compiler/machines/x86-64/rulrew.scm index 1f6391022..b3a6a8e21 100644 --- a/src/compiler/machines/x86-64/rulrew.scm +++ b/src/compiler/machines/x86-64/rulrew.scm @@ -224,30 +224,6 @@ USA. (and (fix:fixnum? n) (predicate n))))))) -(define-rule rewriting - (OBJECT->FLOAT (REGISTER (? operand register-known-value))) - ;; This is not quite what we want. We really want to rewrite all - ;; OBJECT->FLOAT expressions with known constant operands, not just - ;; the nonzero ones, and then decide later whether to put it in - ;; memory based on whether there is a temporary register that we can - ;; zero with XOR. By not rewriting this case when the constant is - ;; zero, using a temporary may cause some other register to be - ;; written to memory, which defeats the purpose of using XOR to - ;; avoid memory access. - (QUALIFIER (rtl:constant-flonum-test operand flo:nonzero?)) - (rtl:make-object->float operand)) - -(define (rtl:constant-flonum-test expression predicate) - (and (rtl:object->float? expression) - (let ((expression (rtl:object->float-expression expression))) - (and (rtl:constant? expression) - (let ((n (rtl:constant-value expression))) - (and (flo:flonum? n) - (predicate n))))))) - -(define-integrable (flo:nonzero? value) - (not (flo:= value 0.))) - ;;;; Indexed addressing modes (define-rule rewriting -- 2.25.1