This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Creating a more efficient sincos interface
On September 13, 2018 4:32:42 PM GMT+02:00, Alexander Monakov <email@example.com> wrote:
>On Thu, 13 Sep 2018, Wilco Dijkstra wrote:
>> What do people think? Ideally I'd like to support this in a generic
>way so all targets can
>> benefit, but it's also feasible to enable it on a per-target basis.
>Also since not all libraries
>> will support the new interface, there would have to be a flag or
>configure option to switch
>> the new interface off if not supported (maybe automatically based on
>the math.h header).
>GCC already has __builtin_cexpi for this, so I think you can introduce
>implementation in libc, and then adjust expand_builtin_cexpi
Note currently we expand that to sincos (if available) or cexp. We use it for canonicalization and better optimization on GIMPLE (register promoting the pointed to vars).
>I wonder if it would be possible to add a fallback cexpi implementation
>libgcc.a that would be picked by the linker if there's no such symbol
That would probably be a requirement.