Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!uvaarpa!mcnc!duke!juliet!khera From: khera@juliet.cs.duke.edu (Vick Khera) Newsgroups: comp.lang.c Subject: Re: C optimizer Keywords: C pure function optimization Message-ID: <13649@duke.cs.duke.edu> Date: 24 Feb 89 17:51:44 GMT References: <515@larry.UUCP> <9648@smoke.BRL.MIL> <1026@frog.UUCP> <9693@smoke.BRL.MIL> Sender: news@duke.cs.duke.edu Reply-To: khera@cs.duke.edu (Vick Khera) Organization: Duke University CS Dept.; Durham, NC Lines: 24 In article <9693@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1026@frog.UUCP> john@frog.UUCP (John Woods) writes: >>The 68881 chip has FCOS, FSIN, and (gasp) FSINCOS which simultaneously >>computes cos() and sin() of the same argument. A sufficiently clever >>compiler could potentially make great use of that. > >Well, hurray -- I've wanted that for years! I do hope C implementors >will perform this optimization; it could help us computer-graphics types >quite a bit. The Sun 3 C compiler will use the intrinsic functions of the 68881 chip if you tell it to compile with the f68881.il inline-expansion file. i beilieve it is located in /usr/lib/f68881/libm.il under 4.0, and in /usr/lib/f68881.il in 3.x. example compile line: cc -o prog prog.c /usr/lib/f68881.il vick. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ARPA: khera@cs.duke.edu Department of Computer Science CSNET: khera@duke Duke University UUCP: decvax!duke!khera Durham, NC 27706