[Bug middle-end/31249] pseudo-optimzation with sincos/cexpi
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Mon Mar 19 12:44:00 GMT 2007
------- Comment #5 from dominiq at lps dot ens dot fr 2007-03-19 12:43 -------
> There is no option to turn it off. But for !TARGET_C99_FUNCTIONS and
> !TARGET_HAS_SINCOS targets it's off.
>From my understanding of the thread
http://gcc.gnu.org/ml/gcc/2007-03/msg00639.html
if !TARGET_64BIT, then TARGET_C99_FUNCTIONS depends on
darwin_macosx_version_min which seems presently default to 10.1.
So TARGET_C99_FUNCTIONS seems to be set to 0 at least for a G5 under
OSX 10.3 and a G4 under 10.4.
> Does darwin have a sincos() library function?
I don't know. If there is no answer in this PR, I can ask the
question on gcc@gcc.gnu.org.
>From the behavior reported in PR30969, PR30980, and PR31161, it seems
that the optimization is off for gcc, but on for g++ and gfortran,
though I cannot figure out why.
> If the ABI were not stupid of course ;)
Since sin() and cos() are non trivial functions, I am very surprised
that a wrong API makes a 50% difference.
If the API is so time consuming, why not inline sin() and cos()?
In addition a decent optimizer should be able to eliminate redundant
part of the codes, making the use of a sincos() function not necessary,
or am I too naive?
What is the best way to collect data on the different platform
to evaluate how this optimization is really working?
I have only access to OSX and Intel or AMD64 under Linux.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31249
More information about the Gcc-bugs
mailing list