[RFC] Tree level sin, cos -> sincos transformation
Geoffrey Keating
geoffk@geoffk.org
Mon Dec 19 02:45:00 GMT 2005
Richard Guenther <rguenther@suse.de> writes:
> The patch below implements sin and cos fusion to sincos using
> canonicalization to __imag/__real cexp ({0, x}) and relying on
> PRE to CSE them. At expand time this canonicalization is
> undone either to sin, cos or sincos, depending on the expression
> generated by TER (that's a hack, a separate pass for this is
> needed, see also the related hack in out-of-ssa to mark the
> target of c = cexp ({0, x}) addressable). Further a new
> expand_builtin_sincos is provided to make use of f.i. the
> i387 fsincos instruction (we didn't expand calls to sincos
> to fsincos before).
>
> With this patch we can do the sin, cos to sincos transformation
> on targets other than i387.
>
> Comments?
That's clever!
Yes, this sounds like an excellent idea. I don't see anything
particularly wrong with the patch. Did you want an approval or just
comments?
More information about the Gcc-patches
mailing list