This is the mail archive of the
mailing list for the GCC project.
Questions about "Handle constant exponents." in gcc/builtins.c
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: gcc at gcc dot gnu dot org
- Date: Tue, 16 Mar 2010 16:11:00 +0100
- Subject: Questions about "Handle constant exponents." in gcc/builtins.c
In the block "Handle constant exponents." in gcc/builtins.c, the condition
!optimize_size has been replaced with optimize_insn_for_speed_p () between
gcc 4.3 and 4.4, but I have not been able to find when and why.
Does anybody remembers the when and why?
This change make the optimization sensitive to PR40106 and unless it has
compeling reasons it should be reverted in this piece of code.
My second question is why using optimize_size? I think it would be better
to define an upper bound instead of POWI_MAX_MULTS that depends on the kind
of optimisation. I cannot see any situation in which sqrt(a) would not be
better that pow(a,0.5) for speed, size, and accuracy.