This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 16 Dec 2005 14:37:53 -0800, Geoffrey Keating <geoffk@geoffk.org> wrote:
>
> 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?

Just comments.  For sure I need to factor out the expand part into some
helper functions.  But if you like it, I'll continue down this road and clean
up the patch until I like it myself ;)

Thanks!
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]