From 8bd5d96dda1f4b9c4dc49ae9404b0e6d0af1cb91 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Wed, 18 Mar 2009 01:24:53 +0000 Subject: [PATCH] code/irrat-dd.lisp: o Declare POLY-EVAL and POLY-EVAL-1 as maybe-inline functions so they can be semi-inlined. code/irrat.lisp: o I don't think there's any real reason to make the local function REAL-EXPT inline. It's very big and local function call is already good enough. compiler/float-tran.lisp: o Change some functions to be maybe-inline instead of inline to save on space for the the larger double-double functions: SUB-DD, SUB-D-DD, SUB-DD-D, SPLIT. Semi-inline should be good enough for these large functions, saving on cache memory, local function calling sequence should be good enough. --- code/irrat-dd.lisp | 3 ++- code/irrat.lisp | 3 +-- compiler/float-tran.lisp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/irrat-dd.lisp b/code/irrat-dd.lisp index 4e3d48ccf..e5168da03 100644 --- a/code/irrat-dd.lisp +++ b/code/irrat-dd.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/irrat-dd.lisp,v 1.17 2007/08/02 18:18:18 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/irrat-dd.lisp,v 1.18 2009/03/18 01:24:52 rtoy Rel $") ;;; ;;; ********************************************************************** ;;; @@ -67,6 +67,7 @@ "Sqrt(1/2)") ;; Evaluate polynomial +(declaim (maybe-inline poly-eval poly-eval-1)) (defun poly-eval (x coef) (declare (type double-double-float x) (type (simple-array double-double-float (*)) coef) diff --git a/code/irrat.lisp b/code/irrat.lisp index b25ea121b..ddcb43a45 100644 --- a/code/irrat.lisp +++ b/code/irrat.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/irrat.lisp,v 1.58 2008/11/12 15:04:23 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/irrat.lisp,v 1.59 2009/03/18 01:24:52 rtoy Rel $") ;;; ;;; ********************************************************************** ;;; @@ -486,7 +486,6 @@ (complex (coerce (* pow (%cos y*pi)) rtype) (coerce (* pow (%sin y*pi)) rtype))))))))))))) - (declare (inline real-expt)) ;; This is really messy and should be cleaned up. The easiest ;; way to see if we're doing what we should is the macroexpand ;; the number-dispatch and check each branch. diff --git a/compiler/float-tran.lisp b/compiler/float-tran.lisp index c0a31c8d3..0251a35fd 100644 --- a/compiler/float-tran.lisp +++ b/compiler/float-tran.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.128 2008/12/30 16:23:36 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.129 2009/03/18 01:24:53 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1861,7 +1861,7 @@ (declare (optimize (inhibit-warnings 3))) (values s e)))) -(declaim (inline sub-dd)) +(declaim (maybe-inline sub-dd)) (defun sub-dd (a0 a1 b0 b1) "Subtract the double-double B0,B1 from A0,A1" (declare (double-float a0 a1 b0 b1) @@ -1886,7 +1886,7 @@ 0d0) (values r1 r2))))))) -(declaim (inline sub-d-dd)) +(declaim (maybe-inline sub-d-dd)) (defun sub-d-dd (a b0 b1) "Compute double-double = double - double-double" (declare (double-float a b0 b1) @@ -1904,7 +1904,7 @@ (values (float-sign (- a b0) 0d0) 0d0) (values r1 r2))))) -(declaim (inline sub-dd-d)) +(declaim (maybe-inline sub-dd-d)) (defun sub-dd-d (a0 a1 b) "Subtract the double B from the double-double A0,A1" (declare (double-float a0 a1 b) @@ -1946,7 +1946,7 @@ (truly-the ,(type-specifier (node-derived-type node)) (kernel:%make-double-double-float hi lo)))) -(declaim (inline split)) +(declaim (maybe-inline split)) ;; This algorithm is the version given by Yozo Hida. It has problems ;; with overflow because we multiply by 1+2^27. ;; -- GitLab