This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004
----- Original Message -----
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Newsgroups: gmane.comp.gcc.devel
Cc: <gcc@gcc.gnu.org>
Sent: Wednesday, August 18, 2004 2:33 AM
Subject: Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004
>
> Does your glibc contain the fixes posted here?
> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01720.html
> It seems like Jakub predicts these fixes will be in glibc 2.3.4 which
> is the version you listed you have, but I wanted to be sure.
> Otherwise, it's not a fair test if the well known glibc trig "inlines"
> are killing gcc vs icc.
>
> If you have the fixes, I'm curious to know if Jakub got all the
> builtin cases gcc handles. You can easily tell by looking at the -E
> output for alma with 3.5.0 and checking for asm statements. (There
> shouldn't be any because I think all the trig funcs alma used were
> done.) Conversely, if -D__NO_MATH_INLINES improves alma, then he
> missed a few.
>
> I'd also like to know how icc works around this issue. Does it
> provide it's own C library? Does it use glibc but disable the inlines
> somehow?
>
Using glibc 2.3.2, icc 8.0 gets its definition of sin, cos and friends from
"bits/mathcall.h". As __NO_MATH_INLINES is defined, "bits/mathinline.h"
is not used and there is no expansion of standard functions to fancy
assembler.
Regards,
>cat qq.c
#include <math.h>
double aa(double x){
return sin(x)*cos(x);
}
int main(){
double x = 0, y;
unsigned int i;
for(i=0;i<10;++i){
x += 10*i;
aa(x+i);
}
}
>icc -H -O3 -xN qq.c
/usr/include/math.h
/usr/include/features.h
/usr/include/sys/cdefs.h
/usr/include/gnu/stubs.h
/usr/include/bits/huge_val.h
/usr/include/features.h
/usr/include/bits/mathdef.h
/usr/include/bits/mathcalls.h
/usr/include/bits/mathcalls.h
/usr/include/bits/mathcalls.h
>icc -E -dM -O3 -xN qq.c | grep INLINE
#define __NO_MATH_INLINES 1
#define __NO_STRING_INLINES 1
#define __NO_INLINE__ 1