public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Questions about "Handle constant exponents." in gcc/builtins.c
@ 2010-03-16 15:18 Dominique Dhumieres
  2010-03-16 15:37 ` Richard Guenther
  0 siblings, 1 reply; 12+ messages in thread
From: Dominique Dhumieres @ 2010-03-16 15:18 UTC (permalink / raw)
  To: gcc

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.

TIA

Dominique

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Questions about "Handle constant exponents." in gcc/builtins.c
@ 2010-03-18 15:10 Dominique Dhumieres
  2010-03-18 15:13 ` Jakub Jelinek
  0 siblings, 1 reply; 12+ messages in thread
From: Dominique Dhumieres @ 2010-03-18 15:10 UTC (permalink / raw)
  To: gcc

May I remind my original question:

> 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 has been commited by someone and should have been approved by
someone else.

TIA

Dominique

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Questions about "Handle constant exponents." in gcc/builtins.c
@ 2010-03-18 20:53 Dominique Dhumieres
  0 siblings, 0 replies; 12+ messages in thread
From: Dominique Dhumieres @ 2010-03-18 20:53 UTC (permalink / raw)
  To: gcc

> Google is your friend...

Thanks Jack. As you can see in comment #46 of pr40106, I have found
my own way. In my previous attempts I have made two mistakes:
(1) I tried to use the search engine of the gcc mailing lists that
kept parsing optimize_insn_for_speed_p as if the _ were spaces.
(2) I did not realized that the history in only kept in trunk.

> svn blame is your friend, ...

When I report a pr I am not interested at all to blame anything
or anybody, only to see the pr fixed ASAP;-)

Cheers,

Dominique

PS For the ongoing discussion about the equivalence between
sqrt(x) and pow(x, 0.5), I'll only say that some influent
people should learn some basic math!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-03-18 20:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-16 15:18 Questions about "Handle constant exponents." in gcc/builtins.c Dominique Dhumieres
2010-03-16 15:37 ` Richard Guenther
2010-03-18 13:51   ` Vincent Lefevre
2010-03-18 14:30     ` Vincent Lefevre
2010-03-18 14:51     ` Michael Matz
2010-03-18 15:41       ` Vincent Lefevre
2010-03-18 15:49         ` Nathan Froyd
2010-03-18 15:56         ` Joseph S. Myers
2010-03-18 17:06           ` Vincent Lefevre
2010-03-18 15:10 Dominique Dhumieres
2010-03-18 15:13 ` Jakub Jelinek
2010-03-18 20:53 Dominique Dhumieres

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).