This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization comparison: 3.3, 3.4, mainline, tree-ssa
On Apr 19, 2004, at 12:52, Kaveh R. Ghazi wrote:
It seems that it would make sense to have a more generic inline
expansion of these well-known functions at the tree level.
-Geert
...but using trees can be tricky. It's not hard to model e.g. asin at
the tree level using atan2(x, sqrt(1.0 - x * x)); however this is only
a win if we know the entire expression transforms into inline assembly
code. So we don't want to do this transformation on platforms that
don't also have inline intrinsics for atan2 and sqrt.
Therefore, I think it makes sense to do this in the md file where we
know whether we have the other functions expanded.
Yes, this definitely will be target-dependent. The advantage of
having the compiler itself do the transformation is that we can
decide wether or not the expansion will be a good idea, based
on optimization flags, estimated execution count, cost etc.
Maybe a way to specify possible tree transformations in the .md
file would be the best approach.
-Geert