gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [RFC] Tree level sin, cos -> sincos transformation

Subject: Re: [RFC] Tree level sin, cos -> sincos transformation
From: Geoffrey Keating
Date: 16 Dec 2005 14:37:53 -0800
Richard Guenther <rguenther@xxxxxxx> 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?

<Prev in Thread] Current Thread [Next in Thread>