[PATCH] D14707: add fast-math-flags to 'call' instructions (PR21290)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 09:04:15 PST 2015


On Mon, Nov 16, 2015 at 2:53 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> It's probably a fairly minor syntactical point, but what about
> function attributes applied to the callsite? Only a few seem to be
> blessed at the moment, but "readonly" and "readnone" are surely on the
> list for similar reasons. It might be a lighter-weight way to do it.
>

Hi Tim -

Thanks for looking at this patch. I didn't consider new function attributes
for this, and I don't understand the trade-offs. Can you explain why
function attributes might be lighter?

At first glance, it seems like we'd still need clang, IR, and DAG patches
to make this all work, but we'd need different code to handle function
attributes that line up with each existing FMF, so calls would need
different checks than the existing FP binops.

If it is lighter to use attributes, can we make the argument that all FMF
should be done that way? Ie, nuke the existing FMF?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151117/cd23c292/attachment.html>


More information about the llvm-commits mailing list