From owner-cvs-all@FreeBSD.ORG Mon Feb 18 14:02:13 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05BFC16A4AC; Mon, 18 Feb 2008 14:02:13 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CB3C813C50E; Mon, 18 Feb 2008 14:02:12 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IE2Ci7017930; Mon, 18 Feb 2008 14:02:12 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IE2CoA017929; Mon, 18 Feb 2008 14:02:12 GMT (envelope-from bde) Message-Id: <200802181402.m1IE2CoA017929@repoman.freebsd.org> From: Bruce Evans Date: Mon, 18 Feb 2008 14:02:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/msun/src e_rem_pio2.c s_cos.c s_sin.c s_tan.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 14:02:13 -0000 bde 2008-02-18 14:02:12 UTC FreeBSD src repository Modified files: lib/msun/src e_rem_pio2.c s_cos.c s_sin.c s_tan.c Log: Inline __ieee754__rem_pio2(). With gcc4-2, this gives an average optimization of about 10% for cos(x), sin(x) and tan(x) on |x| < 2**19*pi/2. We didn't do this before because __ieee754__rem_pio2() is too large and complicated for gcc-3.3 to inline very well. We don't do this for float precision because it interferes with optimization of the usual (?) case (|x| < 9pi/4) which is manually inlined for float precision only. This has some rough edges: - some static data is duplicated unnecessarily. There isn't much after the recent move of large tables to k_rem_pio2.c, and some static data is duplicated to good affect (all the data static const, so that the compiler can evaluate expressions like 2*pio2 at compile time and generate even more static data for the constant for this). - extern inline is used (for the same reason as in previous inlining of k_cosf.c etc.), but C99 apparently doesn't allow extern inline functions with static data, and gcc will eventually warn about this. Convert to __FBSDID(). Indent __ieee754_rem_pio2()'s declaration consistently (its style was made inconsistent with fdlibm a while ago, so complete this). Fix __ieee754_rem_pio2()'s return type to match its prototype. Someone changed too many ints to int32_t's when fixing the assumption that all ints are int32_t's. Revision Changes Path 1.10 +7 -4 src/lib/msun/src/e_rem_pio2.c 1.12 +4 -3 src/lib/msun/src/s_cos.c 1.12 +4 -3 src/lib/msun/src/s_sin.c 1.12 +4 -3 src/lib/msun/src/s_tan.c