[PATCH] implement asin() and acos() as built-in x87 function
Geert Bosch
bosch@gnat.com
Tue Apr 20 13:44:00 GMT 2004
On Apr 20, 2004, at 04:20, Richard Guenther wrote:
> You want to conditionalize these expansions on !OPTIMIZE_SIZE - if
> they are really bigger than a libcall (which they seem to be).
This is very tricky to determine. In the specific example, the
new code is not only much faster but also smaller: 32 vs 40 bytes.
In the usual case, where asin and acos are not both called with
the same argument, call code is smaller. However, as calls clobber
half of the available registers on x86, in reality there will be
extra spills as well. Having code that uses no integer registers
is a big win on x86.
Probably we need to compile some actual applications with -Os
to determine wether the new expansion results in bigger code or
not.
-Geert
More information about the Gcc-patches
mailing list