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

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 09:24:15 PST 2015


On 17 November 2015 at 09:04, Sanjay Patel <spatel at rotateright.com> wrote:
> 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?

I only meant the syntactic alterations. The handling changes are
likely to be similar either way, but you wouldn't need to change any
part of bitcode parsing or its format. The following is already
accepted by unmodified LLVM, for example:

    declare void @foo()
    define void @bar() {
      call void @foo() "wibble"
      ret void
    }

> 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?

I don't think instructions (other than calls) have attributes at the
moment; they're very much a function-based concept. I can see the
appeal of a unified system though; I suppose it comes down to whether
we want unified tags on function calls or unified fast-math tags more.

Cheers.

Tim.


More information about the llvm-commits mailing list