This is the mail archive of the
mailing list for the GCC project.
Re: std::pow implementation
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Scott Robert Ladd <coyote at coyotegulch dot com>, Alexandre Oliva <aoliva at redhat dot com>, gcc at gcc dot gnu dot org
- Date: 30 Jul 2003 17:58:56 +0200
- Subject: Re: std::pow implementation
- References: <Pine.LNX.4.44.0307301751060.561-100000@goofy>
Op wo 30-07-2003, om 17:52 schreef Richard Guenther:
> > It is no surprise that inlinig with no proper constant propagation and
> > dead code elimination does not produce better code.
> I think this statement is way too harsh, as cprop and dce are quite good
> with gcc - apart from some special cases such as your std::pow(T, int)
> implementation (for which we need to blame the loop unroller, not cprop
> or dce).
True, but it happens too late for languages that build functions as
trees and inline trees. One of the reasons why the inline limits have
been fairly low, was that expand would consume huge amounts of time, and
I've seen PRs for functions that blew up to as much as 1GB.
BTW Another reason was quadratic behavior in other parts of the compiler
(was it the scheduler???).